smtp发送邮件,参数应该怎么配置?

现在在学习发邮件功能,但试了几种邮箱,都没有成功,而且提示不同的错误,具体错误如下:

163

'host' => 'smtp.163.com',
'port' => 587,
'from' => array('address' => 'li_go@163.com', 'name' => 'adminmark'),
'username' => 'li_go',
'password' => 'XXXXXXXX',

Connection to tcp://smtp.163.com:587 Timed Out

QQ

'host' => 'smtp.qq.com',
'port' => 587,
'from' => array('address' => '53957105@qq.com', 'name' => 'adminmark'),
'username' => '5395d7105',
'password' => 'XXXXXXXX',

Failed to authenticate on SMTP server with username "53957105" using 1 possible authenticators

gmail

'host' => 'smtp.gmail.com',
'port' => 587,
'from' => array('address' => 'li53957105@gmail.com', 'name' => 'adminmark'),
'username' => 'li_go@163.com',
'password' => 'XXXXXX',

Expected response code 250 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 http://support.google.com/mail ... 14257 y1sm2734628pbw.89 - gsmtp "

不知道是我配置的问题,还是邮箱设置上的问题,请高手赐教,不胜感激~
已邀请:

绿柠檬a

赞同来自: FiveSay 雨师

我在用qq邮箱发送的时候也遇到Failed to authenticate on SMTP server with username "53957105" using 1 possible authenticat
这个是要开通qq邮箱的smtp服务的,在邮箱的设置中

游水

赞同来自: FiveSay

用QQ的smtp,需要设置ssl加密,465的端口。我这里测试是可以用的。

RoOtXjL

赞同来自: _安吉

在一个小时前 我也遇到了这个问题。先贴上我的配置(qq邮箱发送)

MAIL_DRIVER=smtp
MAIL_HOST=smtp.qq.com
MAIL_PORT=465
MAIL_USERNAME=3103948799@qq.com
MAIL_PASSWORD=butvdylcdohydfib(这里的密码不是邮箱密码是你设置开通smtp生成的授权码
MAIL_ENCRYPTION=ssl

注意事项:
  1. 邮箱必须开通SMTP服务。
  2. 开通服务生成的授权码要记住,填写在密码的位置

其它邮箱感觉应该都是相同的道理,我没有一一去试,163邮箱测试了也是一样的道理

宋小北 - 正在输入...

赞同来自:

port => 25

雨师

赞同来自:

Failed to authenticate on SMTP server with username "53957105" using 1 possible authenticators

这个我也遇到了,请问您是怎么解决的吗

还有我想请问一下如何维护多个发送账号?

_安吉

赞同来自:

MAIL_PASSWORD=butvdylcdohydfib(这里的密码不是邮箱密码是你设置开通smtp生成的授权码)
我还以为是邮箱密码,折腾了好久。还有发送到QQ邮箱是显示是垃圾邮件是怎么回事?

要回复问题请先登录注册