How to remove automatic hyperlinks in emails sent to Gmail

12,069

Solution 1

Adding ​ is a wise option .

Solution for user2447272 :

Replace .co.uk in your mail body with .​co.​uk

Generic solution :

mailBody.replace(".",".​");

It worked out for me.

Solution 2

All tricks with replacing dots didn't work for me.

I found another trick - just replace first letter of the domain in uppercalse.

For example, I had a link: fotodruka.lv which got replaced, but if I enter Fotodruka.lv it remains as text.

Solution 3

Wrapping the @ and . in <span> seems to work too:

emailAddress = emailAddress.replace(/@/g, '<span>@</span>').replace(/@/g, '<span>@</span>')
Share:
12,069
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I am sending an autoresponse email which seems to turn a paragraph text into a hyperlink even though I don't want that to happen. This is only happening to Gmail specifically. The text has to have the .co.uk within as thats the name of the company, so can't remove it by law.

    I can't use an image replacement for this.

    Does anyone know of any suggestions to this?