Jump to content

**SOLVED** mail() Question


komquat

Recommended Posts

when using mail(), I am only able to send email to accounts that end in my own domain (andybourdeau.com)  I can not get it to work for all email

Example:  it sends to me@andybourdeau.com but not to test@yahoo.com


Help is appreciated

Thanks in Advance

Link to comment
Share on other sites


[code=php:0]
//Who gets the mail
$to = 'chris.hamel@andybourdeau.com';  //this works
$to .= ', ';
$to .= 'me@andybourdeau.com';  //works
$to .= ', ';
$to .= 'arbourde@chartermi.net'; // 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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.