Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Links does not work in <a href> tag when content has .com inside

in my code I generate a body of a html email message. Part of it is following:

<a href="mylink.pl">SomeName.com</a>

When I receive this email in my Mail client or in Gmail and when I click the link I'm directed to the SomeName.com and not to the mylink.pl which is in the href part of the <a> tag. And it looks that this situation occurs only for the .com domains.

Any ideas how I could deal with this?

like image 504
Jakub Avatar asked Dec 16 '22 12:12

Jakub


1 Answers

Use absolute URIs in emails. They start with (usually) http://

What you have is a relative URI, which doesn't make much sense in an email. You are probably just hitting your browser's search function when you try to visit it.

like image 165
Quentin Avatar answered Feb 20 '23 19:02

Quentin