I'm trying to send emails in my Symfony 4.4 app, I tryed both Mailer and SwiftMailer.
The app is running inside a Docker container, with shared ports 80 and 3306.
If I try the console command with SwiftMailer I get this:
bin/console swiftmailer:email:send [email protected] [email protected] --subject=hi --body=hi
[OK] 1 emails were successfully sent.
And after a while I get:
ERROR [app] Exception occurred while flushing email queue: Expected response code 250 but got code "554", with message "554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. [Hostname=XXXX.eurprd04.prod.outlook.com]
This happens with other email providers also, and both, in Mailer and SwiftMailer.
The fact that I get an (error) response from the service provider (Outlook in this case) makes me think that is not a port problem, as the email did actually reach the provider.
Any ideas? I'm quite stuck on this.
Thank you.