1

I am sending an email from my web application, but unfortunately it is broken in some email clients like outlook.com. The url is URL encoded using HttpUtil.UrlEncode and appears fine in desktop Outlook or gmail, but in outlook.com the unicode encoded characters in the link part of are converted back to normal characters (: - etc).

<a href="http://1.1.1.1/fulfillment/URLLink.acsm?action=enterorder&ordersource=AAAA&orderid=AAAA&resid=urn%3auuid%3a52345ffd-d3a4-2452-fas3-234234df3fda&gbauthdate=07%2f15%2f2013+09%3a46&dateval=1373892365&gblver=4&auth=52345ffdd3a4a452fad3234234df3fda4324ad6d">http://1.1.1.1/fulfillment/URLLink.acsm?action=enterorder&ordersource=AAAA&orderid=AAAA&resid=urn%3auuid%3a52345ffd-d3a4-2452-fas3-234234df3fda&gbauthdate=07%2f15%2f2013+09%3a46&dateval=1373892365&gblver=4&auth=52345ffdd3a4a452fad3234234df3fda4324ad6d</a>

When you click the link in outlook.com it opens:

http://1.1.1.1/fulfillment/URLLink.acsm?action=enterorder&ordersource=AAAA&orderid=AAAA&resid=urn:uuid:52345ffd-d3a4-2452-fas3-234234df3fda&gbauthdate=07/19/2013+17:11&dateval=1374264715&gblver=4&auth=52345ffdd3a4a452fad3234234df3fda4324ad6d

I am running out of ideas. Anyone?

MORE INFO: Mail is base64 encoded when received in the mail client:

Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: base64

HTML header inside is:

<!DOCTYPE HTML PUBLIC"-//IETF//DTD HTML//EN"><html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"></head>

1 Answers1

1

Maybe try the following:

  • I see that you haven't closed the anchor tag.
  • If outlook is stripping the url, you should try using a shorter url (using a url shortner service)
dhruvpatel
  • 1,249
  • 2
  • 15
  • 23
  • I think that the anchor is closed. Using a url shortener has crossed my mind but I would prefer a solution with the link as is. Is it really impossible to make sure that a link gets decoded and displayed correctly across all email clients? – Michael Vassiliadis Jul 19 '13 at 17:59
  • If the url/html was encoded when storing the email in database, it needs to be decoded when it goes to the presentation. – dhruvpatel Jul 19 '13 at 18:10
  • Working on email templates, I came to know that **the email clients have their own engine and it modifies your email content** (if you inspect the code, you will see that the html markup for each email client is different than what you provided). I think gmail, yahoo and hotmail are more open in accepting your email content, and outlook is much more restrictive (specially, you cannot load background images in outlook, that works in other email clients for example.) – dhruvpatel Jul 19 '13 at 18:13