komquat Posted November 7, 2006 Share Posted November 7, 2006 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 [email protected] but not to [email protected]Help is appreciatedThanks in Advance Quote Link to comment https://forums.phpfreaks.com/topic/26504-solved-mail-question/ Share on other sites More sharing options...
shortj75 Posted November 7, 2006 Share Posted November 7, 2006 can you post some code to see if someone here canfigure out if that is the problem Quote Link to comment https://forums.phpfreaks.com/topic/26504-solved-mail-question/#findComment-121268 Share on other sites More sharing options...
komquat Posted November 8, 2006 Author Share Posted November 8, 2006 [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] Quote Link to comment https://forums.phpfreaks.com/topic/26504-solved-mail-question/#findComment-121296 Share on other sites More sharing options...
komquat Posted November 8, 2006 Author Share Posted November 8, 2006 Any help on this would be great. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/26504-solved-mail-question/#findComment-121685 Share on other sites More sharing options...
komquat Posted November 9, 2006 Author Share Posted November 9, 2006 Any thoughts on this one?Could it be in the INI file? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/26504-solved-mail-question/#findComment-122206 Share on other sites More sharing options...
pouncer Posted November 9, 2006 Share Posted November 9, 2006 you should try the mail on its own just for that email.[code=php:0]<?phpmail("[email protected]", "subject", "message!"); ?>[/code]If that doesn't work, check your servers SMTP configuration. Quote Link to comment https://forums.phpfreaks.com/topic/26504-solved-mail-question/#findComment-122210 Share on other sites More sharing options...
komquat Posted November 9, 2006 Author Share Posted November 9, 2006 Where do I check my SMTP configurations? You suggestion did not work, so it must be something with my set-up. Quote Link to comment https://forums.phpfreaks.com/topic/26504-solved-mail-question/#findComment-122240 Share on other sites More sharing options...
pouncer Posted November 9, 2006 Share Posted November 9, 2006 If it's not your server, you'll have to contact the server webmasters. Just send them an email describing your problem.It seems like they have only congigured the SMTP for their own server so you can only send emails to *@<thehostsdomain>.com Quote Link to comment https://forums.phpfreaks.com/topic/26504-solved-mail-question/#findComment-122261 Share on other sites More sharing options...
blear Posted November 9, 2006 Share Posted November 9, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/26504-solved-mail-question/#findComment-122264 Share on other sites More sharing options...
komquat Posted November 10, 2006 Author Share Posted November 10, 2006 Thanks all. This was an issue with my host, he currently fixed it and it is working correct, my php was correct! Quote Link to comment https://forums.phpfreaks.com/topic/26504-solved-mail-question/#findComment-122652 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.