Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I force email programs to show images send in html email using php?

I am sending an html email with php and it includes an image. Some email programs, such as gMail have a 'display images' button. The user has to click on that in order for the images in the email to show up.

Is there any way I can force email programs to show images that are sent within html emails generated by php?

like image 694
zeckdude Avatar asked Mar 26 '10 23:03

zeckdude


People also ask

How do I make an image appear in HTML email?

To attach an image, you need to have the encoding scheme of the image you want to attach. This is the base64 string of the picture. You can get this by right-clicking on the image you want to attach, copy the image address, and paste it into the HTML text. The recipient will have a preview of when they open the email.

Why are images not showing in HTML email?

Open the email; click “open message”; click “show content” at the top of the message. Click the Mail menu, then click Mail Settings. Click the “Hide images & disable links in mail from unknown senders” box to clear it. Click the “Save” button.


3 Answers

As a rule of thumb, email clients are configured to display attached images by default (e.g. those with a cid: URI scheme) and not load remote images (which can include tracking information).

If you attach all the images, then you'll usually get them showing up (while inflating your SMTP bandwidth use along with that of your recipients (which can make you unpopular)).

like image 149
Quentin Avatar answered Oct 22 '22 23:10

Quentin


I'm afraid not. The main reason email programs block images is because images are often used to 'report back' to whoever sent the email that the email has been opened. This is a common tactic used by spammers. Also, malicious code is often attached to images and downloading these images is how such code gets executed. Another reason email programs block images.

like image 34
Levi Hackwith Avatar answered Oct 22 '22 22:10

Levi Hackwith


No, you can't force programs you didn't write yourself to do anything.

like image 3
nosklo Avatar answered Oct 22 '22 23:10

nosklo