问题
I am using gmail as an smtp server for my swiftmailer class.
however I am getting
Expected response code 220 but got code "", with message "" in "\classes\Swift\Transport\AbstractSmtpTransport.php"
What does this mean?
回答1:
I think it probably means you sent a blank line to the smtp server.
Make sure none of your commands have line feeds in them.
Can you log the transaction and paste a copy of the log?
see here for details about logging http://swiftmailer.org/docs/logger-plugin
回答2:
I got this when I had the wrong setting in the factories.yml file as below.
class: Swift_SendmailTransport
But it should be the following.
class: Swift_SmtpTransport
来源:https://stackoverflow.com/questions/4940698/smtp-relay-gmail-swiftmailer-expected-response-code-220-but-got-code