Clinton Posted February 19, 2009 Share Posted February 19, 2009 Yes, I searched high and low through google and this site and have tried a couple of different things but nothing is working. I'm trying to imbed an image in an html email that is sent via php but for the life of me I cannot get it working. What am I doing wrong? <?php $to = $_POST['email']; $subject = 'Test'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: Test.com <support@test.com>' . "\r\n"; $body = " $prefix $lname,<p> The rest of HTML Font goes here... blah blah blah... Sincerely, Me! Add image here!!!! "; $headers .= 'Content-type: image/png; name="images/logob.png" . \r\n'; mail($to, $subject, $body, $headers); ?> Quote Link to comment https://forums.phpfreaks.com/topic/145983-solved-html-php-email-image/ Share on other sites More sharing options...
premiso Posted February 19, 2009 Share Posted February 19, 2009 Not sure, but I am pretty sure that "\r\n" need to be in double quotes in your last $headers .= statement, like you have it above. At least that is the main error that sticks out at me. Quote Link to comment https://forums.phpfreaks.com/topic/145983-solved-html-php-email-image/#findComment-766405 Share on other sites More sharing options...
Clinton Posted February 19, 2009 Author Share Posted February 19, 2009 Enhance your calm Sir, Premiso for the answer has been found. :-) Thanks for your help. BTW, when did you move up from Supporter to Guru? Congrats. :-) Quote Link to comment https://forums.phpfreaks.com/topic/145983-solved-html-php-email-image/#findComment-766409 Share on other sites More sharing options...
premiso Posted February 19, 2009 Share Posted February 19, 2009 BTW, when did you move up from Supporter to Guru? Congrats. :-) A month or so ago, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/145983-solved-html-php-email-image/#findComment-766413 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.