大佬教程收集整理的这篇文章主要介绍了如何使 mailgun 模板中的链接正常工作?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
抱歉问了一个非常愚蠢的基本问题。 Mailgun 没有回复我。
我正在使用 mailgun 模板。特别是他们的“行动”模板。我完全按照提供的方式使用它,我没有做任何更改。我向自己发送了电子邮件,但无法点击其中的链接(到 http://www.mailgun.com
)。
我尝试过 gmail + microsoft 客户端。
HTML 中还包含 =3D
,我不明白,但我认为没问题。
链接跟踪已经关闭。
他们电子邮件的完整 HTML 是:
<!DOCTYPE HTML>
<HTML style="Font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;">
<head>
<Meta name="vIEwport" content="wIDth=device-wIDth" />
<Meta http-equiv="Content-Type" content="text/HTML; charset=UTF-8" />
<title>Actionable emails e.g. reset password</title>
<style type="text/CSS">
img {
max-wIDth: 100%;
}
body {
-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; wIDth: 100% !important; height: 100%; line-height: 1.6em;
}
body {
BACkground-color: #f6f6f6;
}
@media only screen and (max-wIDth: 640pX) {
body {
padding: 0 !important;
}
h1 {
Font-weight: 800 !important; margin: 20px 0 5px !important;
}
h2 {
Font-weight: 800 !important; margin: 20px 0 5px !important;
}
h3 {
Font-weight: 800 !important; margin: 20px 0 5px !important;
}
h4 {
Font-weight: 800 !important; margin: 20px 0 5px !important;
}
h1 {
Font-size: 22px !important;
}
h2 {
Font-size: 18px !important;
}
h3 {
Font-size: 16px !important;
}
.container {
padding: 0 !important; wIDth: 100% !important;
}
.content {
padding: 0 !important;
}
.content-wrap {
padding: 10px !important;
}
.invoice {
wIDth: 100% !important;
}
}
</style>
</head>
<body itemscope itemtype="http://scheR_347_11845@a.org/Emailmessage" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; wIDth: 100% !important; height: 100%; line-height: 1.6em; BACkground-color: #f6f6f6; margin: 0;" bgcolor="#f6f6f6">
<table class="body-wrap" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; wIDth: 100%; BACkground-color: #f6f6f6; margin: 0;" bgcolor="#f6f6f6"><tr style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;"><td style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; vertical-align: top; margin: 0;" valign="top"></td>
<td class="container" wIDth="600" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; vertical-align: top; display: block !important; max-wIDth: 600px !important; clear: both !important; margin: 0 auto;" valign="top">
<div class="content" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; max-wIDth: 600px; display: block; margin: 0 auto; padding: 20px;">
<table class="main" wIDth="100%" celLPADding="0" cellspacing="0" itemprop="action" itemscope itemtype="http://scheR_347_11845@a.org/ConfirmAction" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; border-radius: 3px; BACkground-color: #fff; margin: 0; border: 1px solID #e9e9e9;" bgcolor="#fff"><tr style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;"><td class="content-wrap" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; vertical-align: top; margin: 0; padding: 20px;" valign="top">
<Meta itemprop="name" content="Confirm Email" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;" /><table wIDth="100%" celLPADding="0" cellspacing="0" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;"><tr style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;"><td class="content-block" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
Please confirm your email address by clicking the link below.
</td>
</tr><tr style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
We may need to send you critical information about our service and it is important that we have an accurate email address.
</td>
</tr><tr style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;"><td class="content-block" itemprop="handler" itemscope itemtype="http://scheR_347_11845@a.org/httpActionHandler" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
<a href="http://www.mailgun.com" class="btn-priMary" itemprop="url" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; color: #FFF; text-decoration: none; line-height: 2em; Font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; text-transform: cAPItalize; BACkground-color: #348eda; margin: 0; border-color: #348eda; border-style: solID; border-wIDth: 10px 20px;">Confirm email address</a>
</td>
</tr><tr style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
— The Mailgunners
</td>
</tr></table></td>
</tr></table><div class="footer" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; wIDth: 100%; clear: both; color: #999; margin: 0; padding: 20px;">
<table wIDth="100%" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;"><td class="aligncenter content-block" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 12px; vertical-align: top; color: #999; text-align: center; margin: 0; padding: 0 0 20px;" align="center" valign="top">Follow <a href="http://twitter.com/mail_gun" style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 12px; color: #999; text-decoration: underline; margin: 0;">@mail_Gun</a> on Twitter.</td>
</tr></table></div></div>
</td>
<td style="Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; vertical-align: top; margin: 0;" valign="top"></td>
</tr></table></body>
</HTML>
老实说,这对我来说看起来不错,但我远不是专家。我很感激任何建议。
编辑:
这是当我点击“显示原件”时出现在我的电子邮件客户端中的 HTML:
<!DOCTYPE HTML>
<HTML style=3D"Font-family: 'Helvetica Neue',sans-serif;=
Box-sizing: border-Box; Font-size: 14px; margin: 0;">
<head>
<Meta name=3D"vIEwport" content=3D"wIDth=3Ddevice-wIDth" />
<Meta http-equiv=3D"Content-Type" content=3D"text/HTML; charset=3DUTF-8" />
<title>Actionable emails e.g. reset password</title>
<style type=3D"text/CSS">
img {
max-wIDth: 100%;
}
body {
-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; wIDth:=
100% !important; height: 100%; line-height: 1.6em;
}
body {
BACkground-color: #f6f6f6;
}
@media only screen and (max-wIDth: 640pX) {
body {
padding: 0 !important;
}
h1 {
Font-weight: 800 !important; margin: 20px 0 5px !important;
}
h2 {
Font-weight: 800 !important; margin: 20px 0 5px !important;
}
h3 {
Font-weight: 800 !important; margin: 20px 0 5px !important;
}
h4 {
Font-weight: 800 !important; margin: 20px 0 5px !important;
}
h1 {
Font-size: 22px !important;
}
h2 {
Font-size: 18px !important;
}
h3 {
Font-size: 16px !important;
}
.container {
padding: 0 !important; wIDth: 100% !important;
}
.content {
padding: 0 !important;
}
.content-wrap {
padding: 10px !important;
}
.invoice {
wIDth: 100% !important;
}
}
</style>
</head>
<body itemscope itemtype=3D"http://scheR_347_11845@a.org/Emailmessage" style=3D"Font-f=
amily: 'Helvetica Neue',sans-serif; Box-sizing: border-Box;=
Font-size: 14px; -webkit-font-smoothing: antialiased; -webkit-text-size-ad=
just: none; wIDth: 100% !important; height: 100%; line-height: 1.6em; BACkg=
round-color: #f6f6f6; margin: 0;" bgcolor=3D"#f6f6f6">
<table class=3D"body-wrap" style=3D"Font-family: 'Helvetica Neue',Helvetica=,sans-serif; Box-sizing: border-Box; Font-size: 14px; wIDth: 100%; ba=
ckground-color: #f6f6f6; margin: 0;" bgcolor=3D"#f6f6f6"><tr style=3D"Font-=
family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box=
; Font-size: 14px; margin: 0;"><td style=3D"Font-family: 'Helvetica Neue',H=
elvetica,sans-serif; Box-sizing: border-Box; Font-size: 14px; vertica=
l-align: top; margin: 0;" valign=3D"top"></td>
<td class=3D"container" wIDth=3D"600" style=3D"Font-family: 'Helvetica =
Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; =
vertical-align: top; display: block !important; max-wIDth: 600px !important=
; clear: both !important; margin: 0 auto;" valign=3D"top">
<div class=3D"content" style=3D"Font-family: 'Helvetica Neue',Helveti=
ca,sans-serif; Box-sizing: border-Box; Font-size: 14px; max-wIDth: 60=
0px; display: block; margin: 0 auto; padding: 20px;">
<table class=3D"main" wIDth=3D"100%" celLPADding=3D"0" cellspacing=
=3D"0" itemprop=3D"action" itemscope itemtype=3D"http://scheR_347_11845@a.org/ConfirmA=
ction" style=3D"Font-family: 'Helvetica Neue',sans-serif; b=
ox-sizing: border-Box; Font-size: 14px; border-radius: 3px; BACkground-colo=
r: #fff; margin: 0; border: 1px solID #e9e9e9;" bgcolor=3D"#fff"><tr style=
=3D"Font-family: 'Helvetica Neue',sans-serif; Box-sizing: b=
order-Box; Font-size: 14px; margin: 0;"><td class=3D"content-wrap" style=3D=
"Font-family: 'Helvetica Neue',sans-serif; Box-sizing: bord=
er-Box; Font-size: 14px; vertical-align: top; margin: 0; padding: 20px;" va=
lign=3D"top">
<Meta itemprop=3D"name" content=3D"Confirm Email" style=3D"fo=
nt-family: 'Helvetica Neue',sans-serif; Box-sizing: border-=
Box; Font-size: 14px; margin: 0;" /><table wIDth=3D"100%" celLPADding=3D"0"=
cellspacing=3D"0" style=3D"Font-family: 'Helvetica Neue',s=
ans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;"><tr style=
=3D"Font-family: 'Helvetica Neue',sans-serif; Box-sizing: b=
order-Box; Font-size: 14px; margin: 0;"><td class=3D"content-block" style=
=3D"Font-family: 'Helvetica Neue',sans-serif; Box-sizing: b=
order-Box; Font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20=
px;" valign=3D"top">
Please confirm your email address by clicking the link =
below.
</td>
</tr><tr style=3D"Font-family: 'Helvetica Neue',A=
rial,sans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;"><td c=
lass=3D"content-block" style=3D"Font-family: 'Helvetica Neue',Ari=
al,sans-serif; Box-sizing: border-Box; Font-size: 14px; vertical-align: top=
; margin: 0; padding: 0 0 20px;" valign=3D"top">
We may need to send you critical information about our =
service and it is important that we have an accurate email address.
</td>
</tr><tr style=3D"Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;"><td c=
lass=3D"content-block" itemprop=3D"handler" itemscope itemtype=3D"http://sc=
hema.org/httpActionHandler" style=3D"Font-family: 'Helvetica Neue',Helvetic=
a,sans-serif; Box-sizing: border-Box; Font-size: 14px; vertical-align=
: top; margin: 0; padding: 0 0 20px;" valign=3D"top">
<a href=3D"http://www.mailgun.com" class=3D"btn-priMary=
" itemprop=3D"url" style=3D"Font-family: 'Helvetica Neue',s=
ans-serif; Box-sizing: border-Box; Font-size: 14px; color: #FFF; text-decor=
ation: none; line-height: 2em; Font-weight: bold; text-align: center; curso=
r: pointer; display: inline-block; border-radius: 5px; text-transform: cAPI=
talize; BACkground-color: #348eda; margin: 0; border-color: #348eda; border=
-style: solID; border-wIDth: 10px 20px;">Confirm email address</a>
</td>
</tr><tr style=3D"Font-family: 'Helvetica Neue',sans-serif; Box-sizing: border-Box; Font-size: 14px; vertical-align: top=
; margin: 0; padding: 0 0 20px;" valign=3D"top">
— The Mailgunners
</td>
</tr></table></td>
</tr></table><div class=3D"footer" style=3D"Font-family: 'Helveti=
ca Neue',sans-serif; Box-sizing: border-Box; Font-size: 14p=
x; wIDth: 100%; clear: both; color: #999; margin: 0; padding: 20px;">
<table wIDth=3D"100%" style=3D"Font-family: 'Helvetica Neue',Helv=
etica,sans-serif; Box-sizing: border-Box; Font-size: 14px; margin: 0;=
"><tr style=3D"Font-family: 'Helvetica Neue',sans-serif; bo=
x-sizing: border-Box; Font-size: 14px; margin: 0;"><td class=3D"aligncenter=
content-block" style=3D"Font-family: 'Helvetica Neue',sans=
-serif; Box-sizing: border-Box; Font-size: 12px; vertical-align: top; color=
: #999; text-align: center; margin: 0; padding: 0 0 20px;" align=3D"center"=
valign=3D"top">Follow <a href=3D"http://twitter.com/mail_gun" style=3D"fon=
t-family: 'Helvetica Neue',sans-serif; Box-sizing: border-b=
ox; Font-size: 12px; color: #999; text-decoration: underline; margin: 0;">@=
Mail_Gun</a> on Twitter.</td>
</tr></table></div></div>
</td>
<td style=3D"Font-family: 'Helvetica Neue',sans-serif; =
Box-sizing: border-Box; Font-size: 14px; vertical-align: top; margin: 0;" v=
align=3D"top"></td>
</tr></table></body>
</HTML>
由于可疑的沙盒电子邮件地址,我测试的所有邮件客户端都从电子邮件中删除了链接。
以上是大佬教程为你收集整理的如何使 mailgun 模板中的链接正常工作?全部内容,希望文章能够帮你解决如何使 mailgun 模板中的链接正常工作?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。