无法在 laravel 5.3 中发送密码重置 link?
Could not send password reset link in laravel 5.3?
我无法在电子邮件中发送密码重置 link,错误为:
Swift_TransportException in AbstractSmtpTransport.php line 383:
Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required
我已经关注了this video tutorial但是还是没能解决问题
.env 文件
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=52ca17394c74f6
MAIL_PASSWORD=e89831236006c1
MAIL_ENCRYPTION=tls
mail.php
<?php
return [
'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'from' => [
'address' => 'hello@example.com',
'name' => 'Example',
],
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'sendmail' => '/usr/sbin/sendmail -bs',
];
mailtrap 主机是 smtp.mailtrap.io 而这不是您的 .env 文件所具有的。此外,当您更改 .env 文件时,您应该清除配置,因为它可能被缓存。您可以通过 运行 php artisan config:clear
清除它
我无法在电子邮件中发送密码重置 link,错误为:
Swift_TransportException in AbstractSmtpTransport.php line 383: Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required
我已经关注了this video tutorial但是还是没能解决问题
.env 文件
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=52ca17394c74f6
MAIL_PASSWORD=e89831236006c1
MAIL_ENCRYPTION=tls
mail.php
<?php
return [
'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'from' => [
'address' => 'hello@example.com',
'name' => 'Example',
],
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'sendmail' => '/usr/sbin/sendmail -bs',
];
mailtrap 主机是 smtp.mailtrap.io 而这不是您的 .env 文件所具有的。此外,当您更改 .env 文件时,您应该清除配置,因为它可能被缓存。您可以通过 运行 php artisan config:clear