Hello,
I am using following code.But I am getting mails properaly.I am receiving emails along with html code .This was working ok before our hosting provide reset the server.What settings need to done with Apache / PHP config files..Pls guide.
[code=php]
<?php
// multiple recipients
$to = ‘[email protected]’ . ‘, ‘; // note the comma
$to .= ‘[email protected]’;
// subject
$subject = ‘Test Mail for HTML formatting’;
// message
$message = ‘
<html>
<head>
<title>Test Mail for HTML formatting</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>This is testing Email, Pls ignore</td><td>1973</td>
</tr>
</table>
</body>
</html>
‘;
// To send HTML mail, the Content-type header must be set
$headers = ‘MIME-Version: 1.0’ . “rn”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “rn”;
// Additional headers
# $headers .= ‘To: Mangesh <[email protected]>, Mangesh <[email protected]>’ . “rn”;
$headers .= ‘From: Site admin <[email protected]>’ . “rn”;
# $headers .= ‘Cc: [email][email protected][/email]’ . “rn”;
# $headers .= ‘Bcc: [email][email protected][/email]’ . “rn”;
// Mail it
//mail($to, $subject, $message, $headers);
if (mail($to, $subject, $message, $headers))
{
echo “Mail Sent Successfully”;
}
else
{
echo “Mail Sending Failed”;
}
?>