Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anchor links only working in browser but not in in HTML email (Outlook)

Tags:

html

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>
&quot;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>.

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.

like image 778
user2117637 Avatar asked Mar 05 '14 06:03

user2117637


2 Answers

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.

like image 116
Mike Avatar answered Sep 21 '22 07:09

Mike


The id/name attribute is like a variable name, for more cross compatible support it really should not have symbols or spaces in the first place.

Think how that would look in the address bar:

  • webpage.html#Wickr%20raises%20%249%20mln%20as%20Alsop%20Louie%2C%20Juniper%20Networks%20invest%20%7C%20Reuters%20

So I guess the silly answer is not to use spaces... That being said, I've noticed both outlook and winword will edit your hyperlink in different ways depending on the prefix "File:" or "http:". Hopefully that helps.

like image 20
Jason K. Avatar answered Sep 21 '22 07:09

Jason K.