dou12754 2016-05-20 12:08
浏览 52

谷歌应用程序smtp无法验证laravel 5.2

I'm using Laravel 5.2 and google app for my email . I try connect my website in my google app with smtp but i have this error Failed to authenticate on SMTP server with username "email@domaine.com" using 3 possible authenticators

in my config/mail.php

return [
      'driver' => env('MAIL_DRIVER', 'smtp'),
      'host' => env('MAIL_HOST', 'smtp-relay.gmail.com'),
      'port' => env('MAIL_PORT', 587),
      'from' => ['address' => 'email@domaine.com', 'name' => null],
      'encryption' => env('MAIL_ENCRYPTION', 'tls'),
      'username' => 'email@domaine.com',
      'password' => 'mypassword',
      'sendmail' => '/usr/sbin/sendmail -bs',
]
  • 写回答

2条回答 默认 最新

  • dougan0529 2016-05-21 22:53
    关注

    Not sure if this is your case, but, note that if you have 2 Factor Authentication enabled on your Google Account, you will have to create an application password to use in your Laravel application, your main password won't work.

    Not sure if this is your case though but something like this did happened to me once.

    评论

报告相同问题?

悬赏问题

  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区
  • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示