Expected response code 220 but got code “”, with message “””
2017-04-06 12:26
826 查看
在使用swift_mailer时出现了以下错误:
Expected response code 220 but got code "", with message """
解决办法:
这个一般是由于encyption配置导致的
Secure Sockets Layer (SSL)
Transport Layer Security (TLS)
再看看163的SMTP配置说明
![](http://www.weiyongqiang.com/wp-content/uploads/2017/04/d911b41f3f1ec5f60cfe5b29430ba087.png)
所以如果使用ssl端口则encyption配置项必须为465/994如果使用非ssl则应该使用25
Expected response code 220 but got code "", with message """
解决办法:
这个一般是由于encyption配置导致的
Secure Sockets Layer (SSL)
Transport Layer Security (TLS)
'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', 'viewPath' => '@common/mail', // send all mails to a file by default. You have to set // 'useFileTransport' to false and configure a transport // for the mailer to send real emails. 'useFileTransport' => false, 'transport' => [ 'class' => 'Swift_SmtpTransport', 'host' => 'smtp.163.com', 'username' => 'jiaowomrwei@163.com', 'password' => 'xxxxxxxxx', 'port' => '25', 'encryption' => 'tls', ], ],
再看看163的SMTP配置说明
![](http://www.weiyongqiang.com/wp-content/uploads/2017/04/d911b41f3f1ec5f60cfe5b29430ba087.png)
所以如果使用ssl端口则encyption配置项必须为465/994如果使用非ssl则应该使用25
相关文章推荐
- Expected response code 220 but got code “”, with message “””
- Expected response code 220 but got code “”, with message “””
- Yii2 swiftmailer Expected response code 220 but got code "502", with message "502 Error:
- Laravel mail问题Expected response code 250 but got code "", with message ""
- 使用SMTP发送邮件报错:Expected response code 250 but got code "553", with message "553 Envolope sender mis...
- yii2邮件配置教程,报Expected response code 250 but got code "553"原因
- 使用SMTP发送邮件报错:Expected response code 250 but got code "553", with message "553 Envolope sender mis...
- 使用SMTP发送邮件报错:Expected response code 250 but got code "553", with message "553 Envolope sender mis...
- yii2邮件配置教程,报Expected response code 250 but got code "553"原因
- Solr 6.3 Expected mime type application/octet-stream but got text/html解决方法
- solr异常--Expected mime type application/octet-stream but got text/html.
- Expected mime type application/octet-stream but got text/html.
- solr异常--Expected mime type application/octet-stream but got text/html.
- solrj6.2异常--Expected mime type application/octet-stream but got text/html.
- Solr4.6 Expected content type application/octet-stream but got text/html 解决办法
- ReactJs 报错 Element type is invalid: expected a string (from built-in components) or a class/function (for composite components) but got: undefined. Check the render method of `Me`.
- error: expected reference but got (raw string) @+android:style/Animation.Translucent.
- ValueError: Error when checking : expected input_1 to have 4 dimensions, but got array with shape (X
- solrj使用报错:HttpSolrServer$RemoteSolrException: Expected mime type application/xml but got text/html
- expected a string (for built-in components) or a class/function (for composite components) but got: