Search code examples
phphttpemailhttp-refererapple-mail

Email Tracking - Apple Mail


I have asked a similar question to this but for GMail and I was greatly satisfied with an awesome answer I received. However, I am having trouble with another email client: Apple Mail.

I am creating my own email tracking system for email marketing tracking. I have been able to determine each persons email client they are using by using the http referrer but for some reason Apple Mail like GMail does not send across HTTP_REFERRER. For GMail the solution was to use https for where I hosted the transparent image but this hasnt worked for Apple Mail.

print_r($_SERVER); only gives this sort of header:

WM_UCONTROL_XMLRPC_SERVER - http://aaaaaaaaa

HTTPS - on

ACCESS_DOMAIN - aaaaa

DATABASE_SERVER - aaaaaaa

SITE_ROOT - /home/121000

SITE_CGIROOT - /home/121000/cgi-bin

SITE_HTMLROOT - aaaaaa

PHPRC - aaaaa

HTTP_X_FORWARDED_HOST - aaaaaaa

HTTP_X_FORWARDED_SERVER - aaaaa

HTTP_X_FORWARDED_FOR - aaaaaa

HTTP_HOST - aaaaaa

HTTP_CONNECTION - close

HTTP_USER_AGENT - Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.18 (KHTML, like Gecko)

HTTP_ACCEPT - */*

HTTP_ACCEPT_LANGUAGE - en-us

HTTP_ACCEPT_ENCODING - gzip, deflate

SERVER_SIGNATURE - <address>Apache/2.2.9 Server at aaaaaaa Port 443</address>


SERVER_SOFTWARE - Apache/2.2.9

SERVER_NAME - aaaaaa

SERVER_ADDR - aaaaaa

SERVER_PORT - 443

Please note, certain details where hidden with a string of a.

Is there any other way I can find out when the Apple Mail client requests this image?

As a side note, this is when I wish SO had a way to invite certain users to questions as yc was a great help last time!


Solution

  • Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.18 (KHTML, like Gecko)
    

    You could check to see if that user agent will match to Apple's Mail only (i.e. not Safari or other Apple WebKit implementations).