Page 1 of 1

Problem with multipart will not sent HTML message

Posted: Sun Feb 03, 2008 1:03 pm
by rdkurth
Only the text message shows up but not the html part of the message.
I have looked threw the forum and in the docs but can not seam to get this to work.Using php5 version

Code: Select all

 
// HTML body
$swiftHtml =$hmessage; 
// Plain text body (for mail clients that cannot read HTML)
$swiftPlain = $message; 
$full_name=$this_row['firstname'] ." " . $this_row['lastname'];
//Create the message
$message = new Swift_Message($subject);
$message->attach(new Swift_Message_Part($swiftPlain));
$message->attach(new Swift_Message_Part($swiftHtml, "text/html"));
$message->setReturnPath($MailAddReplyTo);
$message->setReplyTo($MailFrom,$MailFromName);
//Now check if Swift actually sends it
if ($swift->send($message, $this_row['emailaddress'],$MailFrom,$MailFromName)) 
{echo "Sent";}else{ echo "Failed"; exit;}

Re: Problem with multipart will not sent HTML message

Posted: Sun Feb 03, 2008 1:41 pm
by rdkurth
I figured it out the problem was in my HTML Document