Dylan
Dylan

Reputation: 9363

Links in an e-mail working in Outlook, but not in Gmail - any tips?

I compose an e-mail with PHP that includes an A-tag to automatically login to my website and jump to a certain page.

In Outlook everything works fine, but Gmail and Ipad Mail show the link as normal text only, so you can not click on it. Somehow the link is not trusted, I guess, because another short link to my webpage in the e-mail DOES work.

Here's an example of the link, it doesn't work because of security reasons, but you get the idea :

<a id="Example" href="abc.domain.nl/loginlink.php?user=J535ZAFH&password=829%23221&screenid=SCREEN_USER&operation=VIEW&params=actiesoortid=REAGEREN&primaryfieldname=_jgubzp%7Fl%60k%7CmlPQ&primaryfieldvalue=%3E%3D%230%3C%28&optionprofile=150&userprofile=4">

(the username, password , primaryfieldname and primaryfieldvalue are encrypted for more security)

Obviously the URL is very long and doesn's start with 'www', maybe that's the reason, but I don't really see an easy way to shorten the URL and change the subdomain. Maybe it's because the 'params' paramater has a double = ?

Are there maybe any things I can do to get this working in other mail-programs than Outlook ?

Upvotes: 0

Views: 4273

Answers (3)

Steve Yancharas Jr.
Steve Yancharas Jr.

Reputation: 163

Make sure your headers are right:

$headers .= "Content-Transfer-Encoding: 7BIT";

not:

$headers .= "Content-Transfer-Encoding: quoted-printable";

Upvotes: 1

Dylan
Dylan

Reputation: 9363

I added target='_blank' and now the link works in Gmail too!

Upvotes: 0

Marc Nuri
Marc Nuri

Reputation: 3614

At first sight I notice there is no "http://" in the href attribute this means the link is relative, so it shouldn't work either in Outlook. Try prepending http:// (or whatever protocol it is).

Upvotes: 1

Related Questions