1

I'm trying to send a website link via email. The classic

<a href="website.com" target="_blank">website</a>

The problem is when I receive the email and try to open it. It doesn't want to redirect to the website. I'm not sure what I am doing wrong, can someone help?

I'm not sure if this will help but I'm using PHPMailer with the msgHTML method, which seems to be working fine.

White Lotus
  • 353
  • 2
  • 6
  • 16

3 Answers3

1

Try fully qualifying the URL, I'm not sure the email client will be able to resolve a relative path.

http://website.com

Simon Houlton
  • 182
  • 1
  • 10
  • To be clear, the client will **not** be able to resolve a relative path because an email message has no base URL to be relative to. All links must be absolute. You can use a `base` tag, but everything will break if the `head` tag is stripped, which some stupid webmail clients do. – Synchro Jan 04 '16 at 19:32
0

Try using <a href="http://website.com" target="_blank">website</a>.

Your not e a protocol and its not obvious for your email client that its a link to a http or https protocol.

Bram
  • 765
  • 1
  • 6
  • 14
0

Try this

<a href="http://www.website.com" target="_blank">website</a>

In email content we have to provide absolute path instead of relative path

kannan
  • 691
  • 5
  • 17