• 欢迎 游客 您的光临,下载之前请先阅读 积分规则 。任何技术问题请在论坛提问,本站定制插件、模板主题。售前、售后问题请联系QQ:5916171
    本站自由发布资源可赚取积分及人民币(可提现)(保证资源真实可用,如被举报封号处理。谨慎分布)。
  • 即日起发表主题、回帖、发布&更新资源、创建&回复私信、发布&回复个人动态均需要验证手机号码,其它不受影响。如不便可进群提问。点击链接加入群聊【XenForo讨论社区】:群号1:143277648

已解决 请问一下我把网站放到阿里云虚拟机之后无法发送邮件怎么办

UID
1159
注册
2021/01/04
消息
25
解决方案
1
黄金
4,553G
提示内容:
++ Starting Swift_SmtpTransport
!! Connection could not be established with host smtp.qq.com :Undefined variable: errno (code: 0)

试过了ssl://开头的

原本在其他服务器是没有问题的
到阿里云就出现了这个问题
用的是qq的
SSL 端口465
 
截图你的设置和报错内容,重要信息可打码
 
  • #9
其实这个问题阿里云的虚拟主机为了安全考虑禁用了php的stream_socket_client,然后发信是用的这个模块导致的。
 
  • #10
已解决此问题:src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php这个文件的264行
$this->stream = stream_socket_client($host.':'.$this->params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext);


修改成:

$this->stream = fsockopen($host, $this->params['port'], $errno, $errstr);
 
  • #11
已解决此问题:src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php这个文件的264行
$this->stream = stream_socket_client($host.':'.$this->params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext);


修改成:

$this->stream = fsockopen($host, $this->params['port'], $errno, $errstr);
++ Starting XF\Mail\SmtpTransport << 220 newxmesmtplogicsvrszc1-0.qq.com XMail Esmtp QQ Mail Server. >> EHLO wh-nxhadmk61hx28im0vvj.my3w.com << 250-newxmesmtplogicsvrszc1-0.qq.com 250-PIPELINING 250-SIZE 73400320 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 250-AUTH=LOGIN 250-MAILCOMPRESS 250 8BITMIME >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> MTI4MzA3NDAzOEBxcS5jb20= << 334 UGFzc3dvcmQ6 >> eHh4ZXJ4d2l1YW9xaWNkaQ== << 535 Login Fail. Please enter your authorization code to login. More information in http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256 !! Expected response code 235 but got code "535", with message "535 Login Fail. Please enter your authorization code to login. More information in http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256 " (code: 535) !! Expected response code 235 but got code "535", with message "535 Login Fail. Please enter your authorization code to login. More information in http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256 " Log data: ++ Starting XF\Mail\SmtpTransport << 220 newxmesmtplogicsvrszc1-0.qq.com XMail Esmtp QQ Mail Server. >> EHLO wh-nxhadmk61hx28im0vvj.my3w.com << 250-newxmesmtplogicsvrszc1-0.qq.com 250-PIPELINING 250-SIZE 73400320 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 250-AUTH=LOGIN 250-MAILCOMPRESS 250 8BITMIME >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> MTI4MzA3NDAzOEBxcS5jb20= << 334 UGFzc3dvcmQ6 >> eHh4ZXJ4d2l1YW9xaWNkaQ== << 535 Login Fail. Please enter your authorization code to login. More information in http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256 !! Expected response code 235 but got code "535", with message "535 Login Fail. Please enter your authorization code to login. More information in http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256 " (code: 535) (code: 535) >> RSET << 250 OK
成这样了,咋办
 
后退
顶部 底部