锚链接仅在浏览器中有效,而在HTML电子邮件(Outlook)中无效 [英] Anchor links only working in browser but not in in HTML email (Outlook)
问题描述
我有一个Windows应用程序生成的HTML电子邮件.用于此模板在.aspx页中设计.该电子邮件在页面顶部具有一些链接,这些链接应使用户获得同一电子邮件末尾的详细说明.在浏览器中工作正常,但在Outlook中不起作用.
I have an HTML email generated from a Windows application. The template used for this is designed in .aspx page. The email has some links at top of the page which should take the user to a detailed description to the end of the same email. This works fine in the browser but doesn't work in Outlook.
<a href="#Wickr raises $9 mln as Alsop Louie, Juniper Networks invest | Reuters">Wickr raises $9 mln as Alsop Louie, Juniper Networks invest | Reuters</a>
点击上方的锚标记,应转到此处
The above anchor tag, when clicked, should go here
<b id="Wickr raises $9 mln as Alsop Louie, Juniper Networks invest | Reuters" class="sectionheadline">Wickr raises $9 mln as Alsop Louie, Juniper Networks invest | Reuters</b>
<br>
in.reuters.com—March 03, 2014
<br>
<br>
"BOSTON, March 3 (Reuters) - Alsop Louie Partners led a $9 million investment in Wickr, a San Francisco-based startup founded by privacy advocates in 2012 that produces a mobile app for sending self-destructing text, photo and video messages. Gilman...<br><br>.
在View源中,标记中的id和标记中的href匹配,但是在电子邮件中,当鼠标悬停在链接上时,地址使用'_'而不是空格,这就是链接不起作用的原因.
In View source the id in tag and href in tag match, but in an email when hovered over the link the address has '_' instead of spaces, which is why the links are not working.
推荐答案
因此,您已经对锚标记进行了编码,如下所示:
So you have coded your anchor tags like such:
<a name="test">Wickr raises $9 mln</a>
<a href="#test>Wickr raises $9 mln</a>
这仍然不起作用?您还应该查看广告系列监控器,以了解受支持的浏览器.我已经有一段时间没有编码电子邮件了,但是我记得它总是很麻烦.
And this is still not working? You should also have a look at campaign monitor for supported browsers. I haven't coded emails in a while, but I remember it was always quite a hassle.
这篇关于锚链接仅在浏览器中有效,而在HTML电子邮件(Outlook)中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!