AWS SES虚拟送达管理器:v:roundrect元素跟踪链接未替换
AWS SES Virtual Deliverability Manager 跟踪链接不替换VML元素href的问题
测试AWS SES新功能Virtual Deliverability Manager时遇到一个问题:针对Outlook的邮件模板中,<v:roundrect>(VML元素)内的href属性没有被AWS替换为跟踪链接,但模板中所有普通<a>标签的链接都替换成功了。
原邮件模板代码片段:
<div align="center"> <!--[if mso]> <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://MYWEBSITE.com/produkt/@Model.ProductNumber" style="height:40px;v-text-anchor:middle;width:200px;" arcsize="10%" strokecolor="#800500" fillcolor="#da251d"> <w:anchorlock/> <center style="color:#ffffff;font-family:sans-serif;font-size:13px;font-weight:bold;">Jetzt Bestellen!</center> </v:roundrect> <![endif]--> <a href="https://MYWEBSITE.com/produkt/@Model.ProductNumber" style="background-color:#da251d;border:1px solid #800500;border-radius:4px;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:13px;font-weight:bold;line-height:40px;text-align:center;text-decoration:none;width:200px;-webkit-text-size-adjust:none;mso-hide:all;">Jetzt Bestellen!</a> </div>
现象:其他邮件客户端里的链接都被正确替换为跟踪链接,但Outlook中<v:roundrect>的链接保持原样未替换。看起来AWS SES仅支持替换传统<a>标签的href,且官方文档未提及这一限制。
临时解决方案:修改邮件模板为table嵌套<a>的结构,虽然Outlook中的按钮失去了圆角效果,但跟踪功能恢复正常。修改后的代码:
<div align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td style="padding: 12px 18px 12px 18px; border-radius:5px; background-color: #da251d;" align="center"> <a rel="noopener" target="_blank" href="https://MYWEBSITE.com/produkt/@Model.ProductNumber" target="_blank" style="font-size: 18px; font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #ffffff; text-decoration: none; display: inline-block;">Jetzt Bestellen!</a> </td> </tr> </table> </div>
想问下有没有其他开发者遇到过类似的问题?
内容的提问来源于stack exchange,提问作者BeSter Development
相关产品推荐
相关产品推荐

