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

心不动则不痛 提交于 2019-12-29 08:06:42

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!