Problem Emailing HTML
Posted: Mon Feb 16, 2009 4:59 pm
Hello
I'm having a problem emailing HTML content. I'm getting message data from a PHP form. When ever the stuff is sent through email, it doesnt display in HTML, but instead shows all the HTML tags in the email, Like below.
<P>Hi <<FIRST Name>>,<BR><BR>Hey <STRONG>boss</STRONG> what have you <FONT face="Comic Sans MS" size=3>been</FONT> up to? </P>
Any ideas?
I'm having a problem emailing HTML content. I'm getting message data from a PHP form. When ever the stuff is sent through email, it doesnt display in HTML, but instead shows all the HTML tags in the email, Like below.
<P>Hi <<FIRST Name>>,<BR><BR>Hey <STRONG>boss</STRONG> what have you <FONT face="Comic Sans MS" size=3>been</FONT> up to? </P>
Any ideas?
Code: Select all
$swift =& new Swift(new Swift_Connection_SMTP("localhost"));
$message =& new Swift_Message("$temp_sub");
$message->attach(new Swift_Message_Part($tmp_msg));
$message->attach(new Swift_Message_Part("$tmp_msg", "text/html"));
$email_address = $_SESSION['email_array'][$_SESSION['email_count']][$i];
if ($swift->send($message, new Swift_Address($email_address, $temp_sub), new Swift_Address($temp_from)))
{