How do I stop Gmail from stripping the values out of URLs?

Emailing in html uses Quoted-printable Encoding. The problem with your $mailContent is that the "=" must be represented by =3D

Try adding this: $mailContent = quoted_printable_encode($mailContent);


Click View original/source on the message in Gmail to see if the URLs looks like they should then. If so you know that the problem is how Gmail is formatting the message for your viewing. If it's mutilated even in the source I was wondering if there's anything in your webpage/php/CMS (do you use one) that changes the code.

You should try URL-encoding as @Crisp said. Here's the W3 reference.

Tags:

Html

Email

Gmail