smtp relay - gmail - swiftmailer: Expected respons

2019-01-26 22:37发布

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?

2条回答
疯言疯语
2楼-- · 2019-01-26 23:03

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

查看更多
戒情不戒烟
3楼-- · 2019-01-26 23:16

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

查看更多
登录 后发表回答