I am trying to send an email from PHP using PHPmailer()
.
I have included the following syntax to display the content in a table.
I need to update the table to display the email when the email is received.
How can I accomplish this?
$message ="<html><body> <table><tr><td>HELLO</td></tr></table></body></html>";
$body = eregi_replace("[\]",'',$message);
$mail = new PHPMailer();
$mail->From = $email;
$mail->FromName = $Name;
$mail->CharSet = "utf-8";
$mail->Subject = "GoodNoon:".$Name."";
$mail->IsHTML(true);
$mail->AltBody = "To view the message, please use an HTML compatible email viewer";
$mail->WordWrap = 50;
$mail->MsgHTML($body);
// send as HTML
$mail->AddAddress("[email protected]", "name");
if(!$mail->Send()) {
echo "Emai Not sent: " . $mail->ErrorInfo;
}
else {
echo "Email Sent";
}