身份验证器LOGIN返回了预期的响应代码235,但得到的代码为"535",消息为"535错误的身份验证数据". [英] Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data "

查看:317
本文介绍了身份验证器LOGIN返回了预期的响应代码235,但得到的代码为"535",消息为"535错误的身份验证数据".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用laravel发送电子邮件.但是,尝试发送时会产生以下错误,并且邮件没有发送.但是在localhost上一切正常,没有任何问题.

Hi i am trying to send emails in laravel.But when trying to send it is genrating following error and mails are not sending. But everything worked fine in localhost without any problems.

  Failed to authenticate on SMTP server with username "lifeloveandotherthings94@gmail.com" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data
     ". Authenticator PLAIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data"

以下是我在.env中的代码

Following is my code in .env

MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
MAIL_USERNAME=myemail@gmail.com
MAIL_PASSWORD=MyEmailPassword
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=noreply@lifelove.com
MAIL_FROM_NAME='LifeLoveAndOtherThings'

我还没有在config/mail.php中添加其他代码

I havent added additonal code in config/mail.php

'stream' => [
    'ssl' => [
        'verify_peer' => false,
        'verify_peer_name' => false,
        'allow_self_signed' => true,
    ],
],

我没有更改或在config/mail.php中添加我的电子邮件.我仅在.env文件中进行了设置.这是什么问题.

I havent changed or added my emails in config/mail.php.I have set it up only in .env file. What is the issue here.

推荐答案

我也遇到了类似的错误,并给我加上了密码,它的工作原理就像是魅力.

I have a similar error and I enquoted my password and it worked like charm.

MAIL_PASSWORD="YourEmailPassword"

如果问题仍然存在,请尝试在双引号中使用用户名,密码和端口号.

If the problem still continues try using username, password and port number in double quotes.

如果您使用个人Gmail帐户,请按照以下步骤操作:

If you are using your personal Gmail account then follow these steps :

  1. 转到 https://myaccount.google.com/security#connectedapps
  2. 查看安全性"菜单->具有帐户访问权限菜单的应用.
  3. 您必须将选项允许安全性较低的应用程序"设置为开启.

如果您已经按照这些步骤操作,请尝试重新启动您的项目.如果仍然无法使用,请继续以下步骤:

If you have already followed these steps, try re-starting your project. and if it still doesn't work, please continue these steps :

  1. 访问 https://accounts.google.com/UnlockCaptcha
  2. 单击继续按钮

祝你好运!

这篇关于身份验证器LOGIN返回了预期的响应代码235,但得到的代码为"535",消息为"535错误的身份验证数据".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆