Laravel Mail HTML Issue

2019-08-01 23:04发布

问题:

When I'm sending HTML mail with Laravel the received message by users looks like this:

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>
....

The action button is not rendered as HTML. Does anyone know why? I send mail via notifications:

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'));
}