mail() problems
Posted: Fri Jul 09, 2004 4:58 pm
I've gotten it to work, but for some reason it won't sent to hotmail accounts.
Is there something I need for it to be accepted or something i'm sending that I shouldn't have?
Is there something I need for it to be accepted or something i'm sending that I shouldn't have?
Code: Select all
<?php
$sendto = "SELECT * FROM users WHERE user_newsletter = 'on'";
$sendto = mysql_query($sendto);
$subject = $_POST['subject'];
$message = '<html>
<body bgcolor="black" text="white" link="white" alink="white" vlink="white">';
$message .= '<table width="100%" border="1" bordercolor="#b70000" cellspacing="0" cellpadding="0">
<tr>
<td width="25%" height="75"></td><td width="25%"></td><td width="25%"></td><td width="25%"></td>
</tr>
<tr>
<td width="25%"></td><td rowspan="2" width="50%">';
$message .= $_POST['message'];
$message .= '</td><td width="25%"></td>';
$message .= ' <tr>
<td width="25%"></td><td width="25%"></td>
</tr>
<tr>
<td width="25%" height="75"></td><td width="25%"></td><td width="25%"></td><td width="25%"></td>
</tr>
</table>
</body>
</html>';
While ($sending = MySQL_fetch_array($sendto)){
$recipient = $sending['user_name'];
$remail = $sending['user_email'];
$to = $remail;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "To: {$recipient} <{$remail}>\r\n";
$headers .= "From: Demon Lords Newsletter <noreply_demonlords@demonlords.stalkingtigers.org>\r\n";
mail($to, $subject, $message, $headers);
}
?>