Skip to content Skip to sidebar Skip to footer

How To Deal With Long Links In Html-emails

I've searched the web on this and I can find two solutions: Use a URL-shortner. Use brackets < > to allow insertion of whitespace. This only applies to plain-text emails. I

Solution 1:

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

<pstyle="word-break:break-all;"><fontstyle="word-break:break-all;">hxxp://really_long_link</font></p>

Tested on: MS Office 2007/2010, outlook.com, hotmail.com, gmail.com, yahoo.com (yahoo did not display nicely)


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.

Solution 2:

In Html emails - use html

If you are sending html emails, what's wrong with:

... <ahref="long url">reset your password</a> ...

If the links are getting mangled when you send html emails - the problem is how you're sending emails, not the recipient's email client.

Use a shorter hash

Is a super long hash (is it a hash, or is it encrypted?) really necessary? Using any hash that is long enough to not be brute-forced before it expires aught to be sufficient. Asking users to copy and paste a string that is obviously going to wrap isn't going to help the user, it's just pushing a development problem onto the user.

Post a Comment for "How To Deal With Long Links In Html-emails"