Jump to content

**SOLVED** mail() Question


komquat

Recommended Posts


[code=php:0]
//Who gets the mail
$to = '[email protected]';  //this works
$to .= ', ';
$to .= '[email protected]';  //works
$to .= ', ';
$to .= '[email protected]'; // does not work



$mail_message = "<table align='center' border='1'>
<tr>
<th>Week</th>
<th>Race</th>
<th>Track</th>
<th>Driver</th>
</tr>";


$mail_sql = "SELECT nascar_first.week AS week, nascar_schedule.race AS race, $dvalue AS mail_driver, nascar_schedule.track AS track
FROM nascar_first, nascar_schedule
WHERE nascar_first.week = nascar_schedule.sched_id
ORDER BY nascar_first.fantasy_id
";

$qry_mail = mysql_query($mail_sql, $connection) or die ("Could not get the proper info for Mail SQL");

while ($mail = mysql_fetch_array($qry_mail)) {
$mail_week = $mail[week];
$mail_race = $mail[race];
$mail_track = $mail[track];
$mail_driver = $mail[mail_driver];

//Continue the display block
$mail_message .= "
<tr>
<td align='center'>$mail_week</td>
<td align='center'>$mail_race</td>
<td align='center'>$mail_track</td>
<td align='center'>$mail_driver</td>
</tr>";
}

$mail_message .= "</table>";

//Mail message Set up here
$mailmsg = "<p align='center'>Second Half NASCAR Picks for $_SESSION[first_name]";
$mailmsg .= "<html>
<title>Fantasy Nascar</title>
<body>";
$mailmsg .= "<p align='center'>$mail_message</p> \n";
$mailmsg .= "</body></html>";


$subject = "Second Half NASCAR Picks for $_SESSION[first_name]";

$mailheaders  = 'MIME-Version: 1.0' . "\r\n";
$mailheaders .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$mailheaders .= "From: Fantasy Nascar";

mail($to, $subject, $mailmsg, $mailheaders);
[/code]
Link to comment
https://forums.phpfreaks.com/topic/26504-solved-mail-question/#findComment-121296
Share on other sites


This is caused on yahoo's end. All the major email services now only accept SMTP traffic from servers with DNS lookups.

That is, hotmail, yahoo, aol, etc..

This is to prevent spammers from using their SMTP servers directly to massmail spam. Your outgoing email server has to be registered ... somewhere ... for any of those services to accept traffic from it.
Link to comment
https://forums.phpfreaks.com/topic/26504-solved-mail-question/#findComment-122264
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.