Search code examples
phpsmtpgmailswiftmailer

smtp relay - gmail - swiftmailer: Expected response code 220 but got code ""


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?


Solution

  • 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