【发布时间】:2018-08-20 08:15:33
【问题描述】:
当我点击重置密码并填写电子邮件并提交时。然后我收到重置电子邮件,但 URL 是本地主机,我的项目在生产服务器上。
在我的配置\app.php 中:
'url' => env('DB_HOST'),
和
我也试试这个:'url' => env('APP_URL', 'http://yourtradelog.com'),
这是我的环境。文件
MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=**7
MAIL_USERNAME=apikey
MAIL_PASSWORD=SG.E*****hSbq1IAhFC1tPQg.uFah8Jwtm6GY7lh10wGpA_CPU01ySmAC26HFylz_BFI
MAIL_ENCRYPTION=tls
MAIL_FROM_NAME="Your Trade Log"
MAIL_FROM_ADDRESS=****@yourtradelog.com
这是我的重置...:
public function toMail($notifiable)
{
if (static::$toMailCallback) {
return call_user_func(static::$toMailCallback, $notifiable, $this->token);
}
return (new MailMessage)
->subject(Lang::getFromJson('Reset Password Notification from YourTradeLog.com'))
->line(Lang::getFromJson('You are receiving this email because we received a password reset request for your account.'))
->action(Lang::getFromJson('Reset Password'), url(config('app.url').route('password.reset', $this->token, false)))
->line(Lang::getFromJson('If you did not request a password reset, no further action is required.'));
}
【问题讨论】:
-
邮件是通过
php artisan queue:work/listen发送还是与其余代码同步? -
尝试运行 composer dump-autoload
-
我在服务器
php artisan config:clear也做过 -
我也这样做了 `composer dump-autoload` 但直到 localhost @FullSTack01
-
非常感谢您的努力,这只是一个小错误。我的问题解决了。 @Quezler