Search code examples
emailsmtpgmailmailgun

Gmail modifying a href link


In a scenario where mailgun sends an email to a customer that includes a PayNow button, the a href link gets scrambled. I am using my full domain https://example.com/payment/orderReview.html?orderNumber=240 however gmail changes this link in the email to http://email.mail.example.com/c/eJxtjjkOwyAUBU-DS_....superLongString

The email.mail is a property in my DNS file I had to make it setup the mailgun server.

Why is it doing this? How do I prevent this? If I can't, can I get my server to register that link and redirect it to my intended target?

I have my certificate on my server through LetsEncrypt if that means anything to the situation. https works fine with normal http traffic blocked.


Solution

  • Mailgun, through link tracking, is actually the one causing this issue. I have not read any documentation on link tracking or how to set it up properly after walking through the default setup, but disabling this resolves this issue.