Jump to content

[SOLVED] HTML PHP Email image


Clinton

Recommended Posts

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 <[email protected]>' . "\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);

?>

Link to comment
https://forums.phpfreaks.com/topic/145983-solved-html-php-email-image/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.