PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
HaVoC
Forum Commoner
Posts: 83 Joined: Sat Feb 07, 2004 7:20 am
Location: Smiths Falls, CA
Post
by HaVoC » 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?
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);
}
?>
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Fri Jul 09, 2004 5:05 pm
You may need Return-Path and Reply-To headers...
Deemo
Forum Contributor
Posts: 418 Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC
Post
by Deemo » Sat Jul 10, 2004 10:52 am
its also possible that the accounts you are sending to have junk mail filters on and are sent to the Junk Mail folder
HaVoC
Forum Commoner
Posts: 83 Joined: Sat Feb 07, 2004 7:20 am
Location: Smiths Falls, CA
Post
by HaVoC » Sat Jul 10, 2004 1:05 pm
Is there a special command for Reply-To?
kettle_drum
DevNet Resident
Posts: 1150 Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England
Post
by kettle_drum » Sat Jul 10, 2004 1:07 pm
no, you add it as a header.
HaVoC
Forum Commoner
Posts: 83 Joined: Sat Feb 07, 2004 7:20 am
Location: Smiths Falls, CA
Post
by HaVoC » Sat Jul 10, 2004 1:24 pm
What'sReturn-Path used for?
Weirdan
Moderator
Posts: 5978 Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine
Post
by Weirdan » Sat Jul 10, 2004 3:43 pm
It's used to return the message in case it can't be delivered
HaVoC
Forum Commoner
Posts: 83 Joined: Sat Feb 07, 2004 7:20 am
Location: Smiths Falls, CA
Post
by HaVoC » Sun Jul 11, 2004 8:06 am
Ohh! On a big newsletter that could be bad!