Laravel Mail HTML问题

时间:2018-12-10 21:27:29

标签: laravel laravel-5 laravel-blade laravel-mail

当我使用Laravel发送HTML邮件时,用户收到的消息如下:

Hello!
Click here to confirm your account:

<table class="action" align="center" width="100%" cellpadding="0" cellspacing="0">
    <tr>
        <td align="center">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <a href="link_to_my_website" class="button button-blue" target="_blank">Confirm Account</a>
                </tr>
            </table>
        </td>
    </tr>
</table>
....

操作按钮未呈现为HTML。有人知道为什么吗?我通过通知发送邮件:

public function toMail($notifiable)
{
    return (new MailMessage())
        ->subject(app_name() . ': ' . __('exceptions.frontend.auth.confirmation.confirm'))
        ->line(__('strings.emails.auth.click_to_confirm'))
        ->action(__('buttons.emails.auth.confirm_account'), route('frontend.auth.account.confirm', $this->confirmation_code))
        ->line(__('strings.emails.auth.thank_you_for_using_app'));
}

0 个答案:

没有答案