Thursday, May 14, 2015

Prevent automatic hyperlinks in Email notifications in your code

Sometimes you want to send an email notification from your web application or any system that has a website address to be displayed as plain text when you view it on an email client such as Outlook, G-mail, etc. But nowadays, the email clients are so intelligent that even if you send a website address, email address, etc as plain text, they will be converted to links.

Therefore, in order to avoid email clients automatically making hyperlinks, you have to change the pattern but display the same.

I came across some findings to include a white-space character in the link text but not displayed to the user using the html code ​ to include white-space as follows.

www.google.com has to be written as www.google.&#8203com so that the email client will not identify this as a link, still there will not be difference when displaying it.

<p>Check out at www.google.&#8203com</p>

will be displayed as;
Check out at www.google.​com

No comments:

Post a Comment