我想用laravel 5.4发送我本地主机的电子邮件.它向我显示以下错误:错误的 屏幕截图
这是我的.env文件
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=myemail@gmail.com
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tfl
Run Code Online (Sandbox Code Playgroud)
这是我的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", "sendmail", "mailgun", "mandrill", "ses",
| "sparkpost", "log", "array"
|
*/
'driver' => env('MAIL_DRIVER', 'mail'),
/*
|--------------------------------------------------------------------------
| SMTP …Run Code Online (Sandbox Code Playgroud)