Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedded picture in Email - how to?

Status
Not open for further replies.

moshemc

IS-IT--Management
Jan 24, 2009
5
IL
Hi all,

I'm trying to write a PHP code that embeds a picture. The problem is that I cannot embed it, so I use it as follows, and then users cannot see the picture unless they approve the pictures.
Here is my code (I skip the database connection - it works fine):

Code:
$msg = "<html><body><img src=\"[URL unfurl="true"]http://myweb.com/mail_banner.jpg\"><p>Hello[/URL] , <br><br> Thank you for your interest in our products. </p></body></html>";

mail("$email", "Downloading", "$msg","From: Mosh <mosh@email.com>\nReply-To: mosh@email.com\n" .     "MIME-Version: 1.0\n" .     "Content-type: text/html; charset=iso-8859-1");

Do you know how to embed it?
Thanks!
 
That's the only way to have a picture show up. And only works as you have seen if they enable pictures, and the meail client being used supports HTML./

Your other option is send the image as an attachment.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
or sign up to a news letter such as sitepoint and look at the source to the email.
 
my advice would be to use phpmailer and add embedded images via the AddEmbeddedImage method.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top