dessie1981
Programmer
Hi Everyone,
I need some expert advice again.
I have had to change from using mail() to php.mailer() as i want to use an exchange server on a perimiter Lan.
I am sending and recieving mails fine from my application however the html tags are being printed in the body of the mail now.
However when i use my old script using the mail() function it works fine and the html is being interpreted.
Here is my code.
Any Help would be greatful
Regards
Dessie
I need some expert advice again.
I have had to change from using mail() to php.mailer() as i want to use an exchange server on a perimiter Lan.
I am sending and recieving mails fine from my application however the html tags are being printed in the body of the mail now.
However when i use my old script using the mail() function it works fine and the html is being interpreted.
Here is my code.
Code:
//start mime section
$message = new Mail_mime();
$html = file_get_contents($filename);
$message->setHTMLBody($html);
$body = $message->get();
//start mailer section
$mail = new PHPMailer();
$mail->From = "************";
$mail->FromName = "Tester";
$mail->Host = "***.***.***.**";
$mail->Mailer = "smtp";
$mail->AddAddress("***********");
$mail->Subject = "Order Confirmation";
$mail->Body = $body;
if(!$mail->Send())
{
echo '<p align = "center">Error sending mail</p>';
}
else
{
echo '<br>';
echo '<hr>';
echo '<p align ="center">Thank You</p>';
}
Any Help would be greatful
Regards
Dessie