how do i use the phpmailer() class to send html emails with images embedded in it my code is shown below
<?php
require("class.phpmailer.php");
$msg = $_POST['msg'];
$subject = $_POST['subject'];
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "smtp.branddesignexpress.com";
$mail->SMTPAuth = false;
$mail->Username = 'admin@example.com';
$mail->Password = '*****';
$mail->From="mailer@example.com";
$mail->FromName="My site's mailer";
$mail->Sender="mailer@example.com";
$mail->AddReplyTo("replies@example.com", "Replies for my site");
$mail->AddAddress("plasteezy@yahoo.com");
$mail->Subject = $subject;
$mail->IsHTML(true);
#$mail->AddAttachment('http://www.branddesignexpress.com/images/homepage_mainimage.jpg', 'homepage_mainimage.jpg');
$mail->AddEmbeddedImage('homepage_mainimage.jpg', 'logoimg', 'homepage_mainimage.jpg'); // attach file logo.jpg, and later link to it using identfier //logoimg
$mail->Body = $msg;
$mail->AltBody="This is text only alternative body.";
if(!$mail->Send())
{
echo "Error sending: " . $mail->ErrorInfo;;
}
else
{
echo "Letter is sent";
}
?>