prevent Mac Mail from inserting a link into a text string with ".com"

1.3k views Asked by At

I'm testing consumer-facing HTML email for a client. In several areas, business names are dynamically added to the text. Sometimes the business name could be, for instance, "Staples.com". Mac Mail is automatically linking this.

In our case it's a problem, because we need to tightly control the exit points for the user. In some cases, we need to track and report exits, but the autolink over-writes our tracking link. Additionally, the auto-link comes with its own light blue color and formatting, so that on our medium-blue background, it is difficult to read.

How can I construct the a tag around the text to prevent Mac Mail from adding ANY link or formatting? I need Mail to leave it alone!

1

There are 1 answers

2
Deborah On BEST ANSWER

I kind of feel like I cheated when I answer my own question, but maybe this will help someone else. This was just tested and worked. The key appears to be to add a valid website in the href of the a tag. That's what I did, and then forced in a bunch of formatting to ensure it did not look anything like a link, even though it is one.

<a style="color:#ffffff; text-decoration:none; cursor: text;" href="http://www.my-tracking-link.com" class="welcomelink">Staples.com</a>

.welcomelink repeats the inline styles and also manages the hover and visited states.