2009-06-19 04:59:49 UTC
if i compose an email with inline image and attachment image, they could not be displayed correctly in yahoo mail. inline image is missing.
i found that multipart/mixed is missing. phpmailer used multipart/alternative and multipart/related.
pls kindly advise.
<?php
require("phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "localhost"; // SMTP server
$mail->IsHTML(true);
$mail->From = "
from@abc.com";
$mail->AddAddress("
1@abc.com");
$mail->Subject = "An HTML Message";
$mail->AddEmbeddedImage("1.jpg", "img1", "1.jpg","base64","image/jpeg");
$mail->AddAttachment("2.jpg","2.jpg","base64","application/octet-stream");
$mail->Body = 'Hello, <b>my friend</b>! \n\n This message uses HTML entities!<Br><img src="cid:img1"';
$mail->send();
?>