HTML电子邮件中的链接在某些电子邮件客户端中断开



我正在从我的web应用程序发送一封电子邮件,但不幸的是,它在一些电子邮件客户端(如outlook.com)中被破坏了。url是使用HttpUtil.UrlEncode编码的url,在桌面outlook或gmail中显示良好,但在outlook.com中,链接部分的unicode编码字符被转换回正常字符(:-等)。

<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>

当你点击outlook.com中的链接时,它会打开:

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

我没什么主意了。任何人

更多信息:在邮件客户端接收邮件时,邮件是base64编码的:

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

里面的HTML标题是:

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

也许可以尝试以下操作:

  • 我看到你还没有关闭锚标签
  • 如果outlook正在剥离url,您应该尝试使用较短的url(使用url shortner服务)

相关内容

最新更新