laravel:无法使用邮件在Gmail中接收电子邮件

我正在使用laravel,我可以成功发送邮件而没有错误,但问题是我没有收到任何 电子邮件,我已经通过localhost和免费托管尝试过了。</ p>

这是我的env文件</ p>

  APP_ENV = local 
APP_KEY = BASE64:nt0cJ462Ps / 981BuAA368UO3pAZPrYLbVAzKpbyLhwg =
APP_DEBUG =真
APP_LOG_LEVEL =调试
APP_URL = HTTP://本地主机

DB_CONNECTION = MySQL的
DB_HOST =本地主机
DB_PORT = 3306
DB_DATABASE =博客
DB_USERNAME =根
DB_PASSWORD =
\ nBROADCAST_DRIVER = log
CACHE_DRIVER = file
SESSION_DRIVER = file
QUEUE_DRIVER = sync

REDIS_HOST = 127.0.0.1
REDIS_PASSWORD = null
REDIS_PORT = 6379

MAIL_DRIVER = sendmail
MAIL_HOST = smtp.gmail.com
MAIL_PORT = 587

MAIL_USERNAME=myemail@gmail.com
MAIL_PASSWORD = mypass
MAIL_ENCRYPTION = tls

PUSHER_APP_ID =
PUSHER_KEY =
PUSHER_SECRET =
</ code> </ pre>
</ div>

展开原文

原文

I'm using laravel and i can successfully send mail without an error but the problem is i'm not receiving any emails and I've already tried it via localhost and free hosting.

here is my env file

APP_ENV=local
APP_KEY=base64:nt0cJ462Ps/981BuAA368UO3pAZPrYLbVAzKpbyLhwg=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=blog
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
 QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=sendmail
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=myemail@gmail.com
MAIL_PASSWORD=mypass
MAIL_ENCRYPTION=tls

PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=

doubei8541
doubei8541 如何在Laravel5.1中使用gmail发送邮件可能重复?
3 年多之前 回复
drfkl66684
drfkl66684 预期的响应代码250,但得到代码“535”,消息“535-5.7.8用户名和密码不被接受。但我的凭据是正确的
3 年多之前 回复
dongrendang6566
dongrendang6566 MAIL_DRIVER=SMTP
3 年多之前 回复

1个回答



尝试在您的env文件中将MAIL_DRIVER = sendmail更改为MAIL_DRIVER = smtp。</ p>
</ div>

展开原文

原文

try to change MAIL_DRIVER=sendmail to MAIL_DRIVER=smtp on your env file .

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐