I send emails via AWS SES PHP API. I need to track every open of my sent mail, so I append 1x1 image to the body of my mail with URL pointing to gateway recording mail opens. But email opens are not tracked correctly, when emails are opened via different mail clients(e.g. Gmail, Mail.ru).
I send following headers in gateway recording mail opens: Content-Type: image/gif Content-Disposition: attachment; filename="blank.gif" Cache-Control: no-store
I also send "Cache-Control: no-store" header as the tracking image must not be cached to track all mail opens. In this case every mail open is tracked, but on first mail open 2 requests are sent from browser to load tracking image when opening email via Gmail client or mail.ru client. And when I send "Cache-Control: no-cache" header, track image loading request is sent only once on first email open
So how can I track email opens correctly?
The tracker image
<img src="tracker.php" width="1" height="1" border="0">