相关疑难解决方法(0)

当Gmail启用双因素身份验证时,发送电子邮件失败

我正在使用我的Gmail帐户并smtp.gmail.com在我的网络应用程序中测试和发送电子邮件.当我的Gmail帐户启用双因素身份验证时,它无法发送电子邮件,但是当我关闭我的Gmail帐户的双因素身份验证时,该网络应用程序会成功发送电子邮件.感谢任何建议.

gmail smtp smtpclient two-factor-authentication

81
推荐指数
2
解决办法
3万
查看次数

如何在Laravel 5.1中使用Gmail发送邮件?

我一次又一次地尝试测试从localhost发送电子邮件,但我仍然不能.我不知道该怎么办.我尝试搜索找到解决方案,但我找不到一个.我编辑了config/mail.php:

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Mail Driver
    |--------------------------------------------------------------------------
    |
    | Laravel supports both SMTP and PHP's "mail" function as drivers for the
    | sending of e-mail. You may specify which one you're using throughout
    | your application here. By default, Laravel is setup for SMTP mail.
    |
    | Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "ses", "log"
    |
    */

    'driver' => env('MAIL_DRIVER', 'smtp'),

    /*
    |--------------------------------------------------------------------------
    | SMTP Host Address
    |--------------------------------------------------------------------------
    |
    | Here you may provide the host address …
Run Code Online (Sandbox Code Playgroud)

php email gmail laravel-5.1

64
推荐指数
5
解决办法
15万
查看次数