0
我有此代碼通知:Laravel MAILMESSAGE 5.4 ::動作()呈現HTML錯誤
public function toMail($notifiable)
{
return (new MailMessage)
->subject("Welcome to My App")
->greeting('Welcome to My App')
->line('Hello, ' . $notifiable->name)
->line('You have been registered to My App.')
->line('Please do change your temporary password upon your login.')
->line('Your email: ' . $notifiable->email)
->line('Your temporary password: ' . $this->password)
->action('Login to My App', url('/'));
}
似乎在接收到郵件時,它呈現不正確地和由動作()方法生成的HTML是錯的。
Gmail的渲染: 當我通過Mailtrap檢查郵件的HTML,這是源:
正如你所看到的,特殊的HTML字符成爲HTML實體。
我試過通過composer update
更新Laravel,但沒有解決問題。