In my script the message is getting to the section in the code where is says $body = $hmessage; and $text_body = $message; But is not showing up in the email. The subject is there and all the email address are there. What is wrong with code ?
Code: Select all
// HTML body
$body = $hmessage;
// Plain text body (for mail clients that cannot read HTML)
$text_body = $message;
$full_name=$this_row['firstname'] ." " . $this_row['lastname'];
//Create the message
$message =& new Swift_Message($subject);
$message->attach(new Swift_Message_Part($text_body));
$message->attach(new Swift_Message_Part($body, "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;}