hi
i m using mail() function to send mails and it works well for an sample message without including headers.,
when i include headers and send an html content or an sample content i didnt receive an mails ., no mails in spam folder too..
here is my code:
i got the message "success" printed but no mails received.
thanks
i m using mail() function to send mails and it works well for an sample message without including headers.,
when i include headers and send an html content or an sample content i didnt receive an mails ., no mails in spam folder too..
here is my code:
Code:
<?php
$fname='vijay';
$header="MIME-Version: 1.0\r\n";
$header.="Content-type: text/plain; charset=iso-8859-1\r\n";
$header.="From: ".$fname." <from@example.com>\r\n";
$msg='
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<th align="right" valign="top" scope="row">Name</th>
<th align="left" valign="top" scope="row"> </th>
<th align="left" valign="top" scope="row">Vijay</th>
</tr>
<tr>
<th align="right" valign="top" scope="row">Address</th>
<th align="left" valign="top" scope="row"> </th>
<th align="left" valign="top" scope="row">Madurai</th>
</tr>
<tr>
<th align="right" valign="top" scope="row">Tel</th>
<th align="left" valign="top" scope="row"> </th>
<th align="left" valign="top" scope="row">9876543210</th>
</tr>
</table>
';
$subject="testing".date('d-M-Y H:i:s');
$to='to@example.com';
mail($to,$subject,$msg,$header);
echo "success";
?>
thanks
Comment