I am sending email in Symfony2 using Swift Mailer.
//app/config.yml
# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
port: "%mailer_port%"
encryption: "%mailer_encryption%"
spool: { type: memory }
And app/parameters.yml
mailer_transport: smtp
mailer_host: smtp.office365.com
mailer_user: [email protected]
mailer_password: test
mailer_port: 587
mailer_encryption: tls
But I am getting following error again- and again.
app.ERROR: Exception occurred while flushing email queue: Expected response code 250 but got code "", with message "" [] []
How can I resolve this?
"SMTP error 554 is one of the more vague error codes, but is typically caused by the receiving server seeing something in the From or To headers that it doesn't like. This can be caused by a spam trap identifying your machine as a relay, or as a machine not trusted to send mail from your domain." - STMP error 554