markdown - 以纯文本形式获取降价电子邮件
问题描述
我正在使用 laravel Mailable 和 markdown 发送电子邮件,但它发送如下电子邮件,没有得到我做错了什么。
Hello cus1
Please click the button below to verify your email address.
<table class="action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td>
<a href="https://google.com" class="button button-primary"
target="_blank">Verify Email Address</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
If you did not create an account, no further action is required.
Thanks,<br>
PMS
下面是我welcome_email.blade.php
用来生成电子邮件的模板
@component('mail::message')
# Hello {{ $user->name }},
Please click the button below to verify your email address.
@component('mail::button', ['url' => $verificationUrl])
Verify Email Address
@endcomponent
If you did not create an account, no further action is required.
Thanks,<br>
{{ config('app.name') }}
@endcomponent
解决方案
您应该尝试删除刀片文件中的缩进。有时降价会因此而变得疯狂。
尝试这样的事情:
@component('mail::message')
# Hello {{ $user->name }},
Please click the button below to verify your email address.
@component('mail::button', ['url' => $verificationUrl])
Verify Email Address
@endcomponent
If you did not create an account, no further action is required.
Thanks,<br>
{{ config('app.name') }}
@endcomponent
推荐阅读
- jquery - 如何根据计算的数字将类分配给 div
- mqtt - 使用设备和 IoTAgent-UL 创建蚊子订阅的正确方法是什么
- database - 如何在 bash shell 中执行一个输出不是另一个函数的函数?
- reactjs - 为什么 React Hooks Axios API 调用会返回两次?
- bash - 如何正确传递带有空格的字符串作为单独的命令行参数?
- php - 在结帐/结帐时进行注册的新方法
- javascript - 为在新窗口中打开的 blob URL 设置文件名/标题
- tensorflow - 使用 TF_HUB 在 keras 中实现 BERT
- python - 什么可以让 pip 对成功安装撒谎?
- excel - 从函数的可视 ms 访问构建 Excel