【发布时间】:2017-06-23 00:17:18
【问题描述】:
我有用于验证用户电子邮件地址的电子邮件模板。
当用户点击按钮时,用户的电子邮件地址被验证。
以前我发送链接时没有将其包装到按钮中,它工作正常。
但现在我已经将它包装成一个按钮,当我点击该按钮时,它会将我发送到一些不同的 url,看起来像这样:
email.example.com/adasd_fsdfsf.....so on
电子邮件刀片:
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" rel="stylesheet">
</head>
<body>
<h2>Please verify your email address</h2>
<div class="row">
Thanks for creating an account with the example.com. Please click the button below to verify your email
address <br>
<a href="{{ URL::to('signup/email/' . $confirmation_code) }}"> <button class="btn-block btn btn-default">verify Email</button></a>
</div>
</body>
【问题讨论】:
-
虽然您可以在 HTML 电子邮件中引用外部样式表,但几乎所有电子邮件客户端都会阻止此操作,因此您无论如何都无法获得该样式。如果你这样做
<a href="{{ URL::to('signup/email/' . $confirmation_code) }}">verify Email</a>会发生什么? -
@James 同样的事情发生了:(
-
也可以试试
{{ url('signup/email/' . $confirmation_code) }} -
@James 什么都没发生
-
不要用锚包裹按钮。将锚样式设置为按钮,或在按钮单击时使用“location.href”。
标签: php laravel email laravel-5.3 mailgun