Page 1 of 1

Images via mail()

Posted: Thu Jul 29, 2004 8:39 am
by Joe
I am playing around with the mail() function to see what I can do and I have came to a hault. I have tried to insert images in the message but it does not seem to work. The mail content is simple:

$EmailContent = '<img src="http://www.site.com/logo.jpg">Hello There';

All it shows is the html and no image,

Any help appreciated


Joe 8)

Posted: Thu Jul 29, 2004 8:52 am
by d3ad1ysp0rk
Your email is set to receive text only.
What provider are you using?
Try setting up a test hotmail account just to fool around with, because I know hotmail can receive html.

Posted: Thu Jul 29, 2004 8:57 am
by Joe
Yes I done it on hotmail as I realised paypal emails had the images. Still no luck though

Posted: Thu Jul 29, 2004 9:46 am
by d3ad1ysp0rk

Code: Select all

<?php mail("youremail@hotmail.com","My PHP script mailer","This is my email!<br /><img src="http://site.com/img.jpg" />","From: myemail@server.com"); ?>
Does that show up correctly?

Posted: Thu Jul 29, 2004 10:36 am
by feyd
it should parse error ;).. even if it worked, it should show up as plain text.. (no content type for HTML)