dongmei8460
2018-07-16 06:15
浏览 94
已采纳

Laravel使用MDaemon电子邮件服务器发送电子邮件但收到错误“需要验证”

I'm trying to send email with my laravel local app using MDaemon WorldClient Private Email email server but i always get this error

Expected response code 250 but got code "530", with message "530 5.7.0 Authentication required"

With my laravel local app, I already tried to send email using mailtrap and gmail and both works fine.

This is my email configuration in .env file

MAIL_DRIVER=smtp
MAIL_HOST=mail.emaildomain.co.id
MAIL_PORT=587
MAIL_USERNAME=myname@emaildomain.co.id
MAIL_PASSWORD=******
MAIL_ENCRYPTION=null

To see if there's something wrong with my email configutraion, I also tried to send email using outlook on my computer with the same email account and configuration that I use on laravel and it works perfectly on outlook. I already double check the outlook SMTP configuration and the laravel but I have no idea why it always fails on laravel.

By the way, i'm using mailable on laravel.

Thank you

图片转代码服务由CSDN问答提供 功能建议

我正在尝试使用我的laravel本地应用程序使用 MDaemon WorldClient私人电子邮件电子邮件服务器,但我总是收到此错误

 预期回复 代码250但得到代码“530”,消息“530 5.7.0 Authentication required”
   
 
 

使用我的laravel本地应用程序,我已经尝试使用mailtrap发送电子邮件 和gmail都很正常。

这是我在.env文件中的电子邮件配置

  MAIL_DRIVER = smtp 
MAIL_HOST = mail.emaildomain  .co.id 
MAIL_PORT = 587 
MAIL_USERNAME=myname@emaildomain.co.id 
MAIL_PASSWORD = ****** 
MAIL_ENCRYPTION = null 
   
 
 

要查看 如果我的电子邮件配置有问题,我还尝试使用我在计算机上使用Outlook的电子邮件发送电子邮件,其中包含我在laravel上使用的相同电子邮件帐户和配置,它在outlook上完美运行。 我已经仔细检查了outlook SMTP配置和laravel,但我不知道为什么它总是在laravel上失败。

顺便说一句,我在laravel上使用mailable。

谢谢

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dou1908 2018-07-20 10:48
    已采纳

    Sorry I did a silly mistake.

    It's just the from parameter of the email and the email username doesn't match.

    Just for a tip, make sure you set all the email config on the .env file. It'll help you a lot. I did the mistake because I set the from parameter in Mailable class and the other in .env.

    点赞 打赏 评论

相关推荐 更多相似问题