Make Gmail automatically show images I embed in my HTML email? - php

I'm constructing HTML emails in PHP with Zend_Mail and I'd like to embed/attach/whatever some images in such a way that Gmail will automatically display them without prompting the user. How can I do this?

Google's Bulk Sender Guidelines say that Gmail will automatically show images for senders who have authenticated their domain:
To ensure that Gmail can identify you:
Use a consistent IP address to send bulk mail.
Keep valid reverse DNS records for the IP address(es) from which you send mail, pointing to your domain.
Use the same address in the 'From:' header on every bulk mail you send.
We also recommend publishing an SPF record, and signing with DKIM or
DomainKeys.
By authenticating, inline images you send will be shown automatically. Recipients will not need to click the "Display images
below" link.
Google offers a page to learn more about email authentication.

You can't without the user approving your imagery. It's an anti-spam/ anti-tracking technique that has to be off by default to work.
You can make Gmail display images (embedded into content) with authenticating emails sent.
You just make sure you have a correct SPF record, and 1024 bit DKIM signed the message.
Then gmail shows embedded images within content.

As of my knowledge, This is not possible. Gmaill will hide the images initially. If the Use enables (by clicking "Always display images from XXXXXX website"), then it will be available from next time onwards

You can always show images if you use Base 64. That way images are embedded as code in the code and aren't coming from anyone else's server, so there is no tracking risk. Just google how to embed an image as Base 64 and that will solve your issue completely.

Related

Pixel Email Tracking not working for Gmail [duplicate]

I was implementing pixel tracking for a gmail web service, but since today google has changed the gmail client to proxy linked images !
Is there any work around, as the proxy is giving my server a fake/masked ip and location?
This is true. gmail has been proxying all user content via it thus showing Mountain View,CA as its REMOTE_ADDR. This is true only for gmail clients. The same logic has not been working on Gmail via outlook or any other mail client.
Most email tracking companies rely on these details to differentiate the recepients of the mail.
I dont think there is a work around. But if there is one we would find out soon given that these companies have a lot to lose.
Meanwhile, you could try using HTTP_X_FORWARDED_FOR or disposition notification headers. But given that this can be messed with, there isnt much option left but just go back to making people click on links!!!
In my experience as of Aug 5 2018 my emails sent with a tracking pixel are blocked by google. I uncheck the send tracking pixel box in my crm and the message arrives instantly. The tracked email never arrives.
I made a video to show but its exactly as I just described and quite boring to watch lol. BUt you get the point. Obviously this is just in my experience but it's too bad because knowing if my clients read it is only way know not to keep sending the same message in a different way assuming it went to spam.
Looks to me like they're caching, not just proxying.. I whipped up a PHP file to output a random image selected out of a collection of 5 images... It's the same image each time.. Testing against Yahoo! mail and outlook, both of which change each time the email is opened..

Tracking emails opened in gMail

I want to track when emails are opened in gMail and display it somewhere.
I don't want to use third party mail service.
I need to track this with something else while using Gmail API.
A colleague said there is a tool like Shiftmail or something.
Do you know any tool to track email sent via Gmail API?
Do you know any tool to track email sent via Gmail API?
AFAIK, Official Gmail Blog have announced about an exciting change to how Gmail works wherein email providers track opens by inserting a small image–unique to each subscriber–into the email. When that image is loaded, we know the email has been opened.
Please check Open tracking in Gmail is now more accurate for more information regarding this change.
On the other hand, you may want to also check and see if Postmark - Tracking opens helps. Sending emails with open tracking enabled will embed an invisible pixel into your emails that allows Postmark to record information when the email is viewed. Please note, however, of the given limitations on the use of Postmark.
Is there an API to take advantage of Gmail's pixel caching?
I'm quite not sure if this is what you're looking for, but you may want to also check Tracking Pixel API. As mentioned,
Google Mail caches images which can cause your pixel to be cached and not fire on email open! To get around this, add a no-cache header to your emails and you should be good to go!

PHP Force remote image download or remote requests inside an email

I am sending our HTML newsletters with an image on each email that help us know if a person actually received that newsletter.
I just add in the HTML body of the email a img tag like that:
<img src="https://www.example.com/read/BASE64URLENCODED_DATA" />
BASE64URLENCODED_DATA is something that I can read on server when the request arrives to know the email address that downloaded that image. We receive the request to download that fake image, we save the data and return some headers to show a transparent image of 1x1 px.
The problem is that usually this works for no more than the 10% of the total emails sent on each newsletter. This means that most of the email clients that receive our newsletter don't permit the downloading of images (showing the classic message "If you want to download attached images click here...").
Is there any way to force an email client to make a remote request like that?
We need to produce more realistic statistics for our newsletters but we can't find a way to force this remote requests or fake images download.
Thank you.
A longer answer - there may be ways how you can trick some e-mail clients, but this will work only on a particular client. There are lots of different clients out there. Maybe you find a way of tricking Oultook, but no guarantee that it works for Google Mail or other web mail service. Then there is Roundcube, Squirrelmail, Horde and other web clients. Then the mobile devices come in - iPhone/iPad mail client, Android mail clients, Outlook mobile.. No, you don't want to do this.
And even if you find a way of tricking all those programs (which I highly doubt), most likely your message will be malformatted and most spam filters will catch it as spam.

mailto: replacement due to size

I have a web page that generates several email addresses. I need to be able to click on a link, which will open an email client such as outlook and populate the bcc field with those email addresses. In the past, we have used html's mailto, which achieves this goal perfectly.
My problem now is that I need to send emails to over 200 people, and mailto cannot handle that much information. Since the page also uses PHP, I have considered PHP's mail() and phpmailer(), but since both require that the entire email be generated on the page and the email client is never opened, they will not work.
Does anybody know of an alternative method I can implement to achieve this functionality?
Create a mailing list, add those e-mails to the mailing-list and send mail there instead.
As a bonus, you can use VERP to prune invalid addresses.
I don't think there is a convenient alternative method.
You could offer a textarea field containing all the addresses in a comma-separated list. That list could be easily copy+pasted into the client's E-Mail program.
If the client's E-Mail is on the same domain as the web site, and you have full control over your server, you could randomly generate E-Mail addresses on your server using PHP:
1293820239453202349#example.com
that E-Mail address would be configured to forward incoming mail (that your user with the mail client writes and sends to that one random address) to the big list of recipients. This is a very advanced method but hard to implement.
Maybe you can make an email group, depending on your mail system, such that when you send a mail to the address of the group, it will distribute to all members?
On our company, we have several groups. all#company.com, sales#company.com, developers#company.com etc. Sending one e-mail to such an address will make all members of the respective group receiving it.
MailTo with a Copy
<a href="mailto:astark1#unl.edu?cc=ASTARK1#UNL.EDU">
MailTo with a Blind Copy
<a href="mailto:astark1#unl.edu?bcc=ASTARK1#UNL.EDU">

What is the best way to implement a petition? (email send after signing the petition)

I need to build a little webapp but I'm not sure what is the best thing to do.
A person that subscribe the petition is signing an email sent to X. This will be also saved to a db in order to show online who subscribed.
The idea is to have a standard text message, the user submit his name and that name goes into the message as signature.
I could make php send the email with the address of the real sender, or let the user copy and paste the text and let him send the email on his own.
I'm not sure of what is the best way to implement it. What will be more "effective", I mean as number of subscribers the solution where the app send the email is easier, but what about the authenticity of the emails? They could be considered not valid if sent all from the same place?
Regardless of the whole thing being a "good" idea or not, you want to keep yourself safe. If you spoof the from field, chances are most of your email (especially for domains with SPF records) will not make it through the first level of spam filtering.
A SPF (Sender Policy Framework) record lists the only IPs that are allowed to send mails for a domain. If a domain has a SPF record and you poll it, you're supposed to treat anything that didn't originate from a listed server as hazardous waste.
Depending on where you're sending these emails, you'll probably end up with your mail server on one or multiple blacklists. That means any email, SPF or not just won't get accepted.
So in short:
Get people to send their own email. Provide templates.
Consider utilizing the full specs for <a href="mailto:... -- you can put the subject and body in the link, allowing templates to be a one-click affair.
You could use Javascript on your site to personalise the message (and therefore mailto: link) while still on your site.
Let me get this straight - so you want to add to the flood of armchair activism email that is already saturating the world to no good purpose, and you're asking how best to do it? I would read the following before going any further with this:
http://www.breakthechain.org/armchair.html

Categories