0

Hi,
I have a problem in sending mail in HTML format using PHP mail() function. The problem is that the HTML is not rendered in microsoft outlook (showing raw data) but in yahoo it is good and the HTML is rendered and shown correctly. These are the mail agent I have checked the mail so far. I have used the following code which is basically taken from PHP manual.

<?php
$to  = 'xyz@example.com'; 

$subject = 'some subject';

$message = 'some HTML code such as a big table';

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: sender <pqr@example.com>' . "\r\n";

mail($to, $subject, $message, $headers);
?>

Can any one say where the problem is and can provide a solution such that is works in all mail agent.

Thanks.

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by peter_budo
0

@buddylee17 - post moved to new thread

@sayaan - Do not piggyback threads (aka "hijack" threads) by posting your question as a reply to another question.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.