我已经在网上搜索过,可以找到两种解决方法:
I've searched the web on this and I can find two solutions:
我正在发送包含敏感信息的HTML电子邮件,例如密码恢复链接和自动身份验证链接.这些安全链接从本质上来说很长.长度超过70个字符或对电子邮件正文施加了任意限制.
I'm sending HTML emails that contains sensitive information, like password recovery links and auto-authentication links. These secure links are, by their nature, quite long. Easily longer than 70 characters or whatever arbitrary limit is imposed on e-mail bodies.
很明显,我不能使用任何形式的URL缩短,因为它会绕过我用于链接的任何安全密码技术.
Obviously I can't use any form of URL-shortning because it would circumvent any secure cryptography technique I've used for the links.
我认为最大的问题是电子邮件客户端对链接的包装不太好. CSS3技术支持很好的自动换行功能,因此MS Outlook将永远不会支持这种方式.
I suppose the largest issue is that the links aren't wrapped nicely by email clients. The nice word-wrapping is supported in CSS3 technique, so there is no way MS Outlook will ever support this.
我如何做到这一点,以使链接不会出现视觉干扰,并且在电子邮件客户端发生故障时可能易于复制粘贴?
示例
如果该链接似乎不起作用,请尝试将其复制粘贴到您的浏览器中: hxxp://发展/#AUTH/YoxOntz0Oj0ExOiJfcmFuG9tbmVzcyI7czoxOTI6kJsYkV0qMGMuZ1pFZVQ5YkRQNDZPR200Unl60dGlpNlhZZC9QcEVeH0lvV2NVVlpWWFcwWlF0VjRyc0p4akYzclJ0GTkJmSlgxco0aEtDS0FuTlBVSXAxUVhCcGdRNGpHMVl5UGZMRFVacDVSQ1BqcU0tKYlNxZ0FqYXpjTkNqTS9LV29xSk4ydGtyeFpNdV0c2VLMERUbEYwc08xUWU5aXR0GOXl0bVFpcjlXeGZjUE100S0o1L1FcmQ4MmhOdm5LUSI7fQ
If the link doesn't seem to work, try copy-pasting it to your browser: hxxp://development/#auth/YoxOntz0Oj0ExOiJfcmFuG9tbmVzcyI7czoxOTI6kJsYkV0qMGMuZ1pFZVQ5YkRQNDZPR200Unl60dGlpNlhZZC9QcEVeH0lvV2NVVlpWWFcwWlF0VjRyc0p4akYzclJ0GTkJmSlgxco0aEtDS0FuTlBVSXAxUVhCcGdRNGpHMVl5UGZMRFVacDVSQ1BqcU0tKYlNxZ0FqYXpjTkNqTS9LV29xSk4ydGtyeFpNdV0c2VLMERUbEYwc08xUWU5aXR0GOXl0bVFpcjlXeGZjUE100S0o1L1FcmQ4MmhOdm5LUSI7fQ
其他说明:
我不希望我的链接过期.如果我希望它们全部过期,我将有几个月的时间框架,而不是数小时.这些链接不仅仅是密码恢复链接.
I do not want my links to expire. If I want them to expire at all I'd have a time frame of months, not hours. These links are not just password recovery links.
推荐答案您是否尝试过Microsoft专有的word-break:break-all ;? ?
Have you tried the Microsoft proprietary word-break:break-all; ?
<td style="word-break:break-all;">
这对我来说效果最好(各供应商之间的最佳兼容性):
This worked best for me (best compatibility across vendors):
<p style="word-break:break-all;"> <font style="word-break:break-all;">hxxp://really_long_link</font> </p>经过以下测试:MS Office 2007/2010,outlook,hotmail,gmail,yahoo(yahoo的显示效果不佳)
Tested on: MS Office 2007/2010, outlook, hotmail, gmail, yahoo (yahoo did not display nicely)
尽管对此进行了编辑以包含<p>...</p>,但如果空格很重要,我会极力建议不要在HTML电子邮件中使用段落标记,因为电子邮件客户端对这些标记的解释不同.
While this was edited to include <p>...</p> I would highly discourage the use of paragraph tags in HTML email if spacing is impotant since email clients interpret these differently.
更多推荐
如何处理HTML电子邮件中的长链接
发布评论