jandrews3 Posted October 25, 2007 Share Posted October 25, 2007 I've got something really weird that I don't understand. I'm having trouble sending php email. I'm sending three similar emails to different addresses ... one to the student, one to the teacher, and one to the parents. All of my tests run fine while I'm sending them all to 3 different email addresses all based at JAMESA3.COM. But when I change one of the email addresses to something else ... a parent email address, my school email address, or anything other than something at jamesa3.com, then it doesn't arrive. I get every indication that it sends, it just never arrives. $to = $email1; $subject = "Online Quiz Writing Assignment"; $body = $fname." ".$lname.", This is an automatic notification for your online vocabulary quiz taken on ".date("D, j M Y H:i:s A")." from IP address ".$ip."."; $count=1; while ($tomra[$count]){ $body = $body."\n".$tomra[$count]; $count++;} $headers = "From: andrewsj@k12tn.net\r\nCC: service@alteredimpressions.com\r\n" . "X-Mailer: php\r\n"; if (mail($to, $subject, $body, $headers)) { echo("<p>Sent to ".$fname." ".$lname." at email ".$email."</p>"); } else { echo("<p>Message delivery failed...</p>"); } $to = $email2; $subject = "Online Quiz Writing Assignment"; $body = $fname." ".$lname.", This is an automatic notification for your online vocabulary quiz taken on ".date("D, j M Y H:i:s A")." from IP address ".$ip."."; $headers = "From: andrewsj@k12tn.net\r\n" . "X-Mailer: php"; if (mail($to, $subject, $body, $headers)) { echo("<p>Sent to ".$fname." ".$lname." at email ".$email."</p>"); } else { echo("<p>Message delivery failed...</p>"); } $to = $email3; $subject = "Your Childs Quiz Grade"; $body = "Dear Mr. and Mrs. ".$lname.",\n This is an automatic notification for an online vocabulary quiz."; $headers = "From: jandrews@k12tn.net\r\n" . "X-Mailer: php"; if (mail($to, $subject, $body, $headers)) { echo("<p>Sent to ".$fname." ".$lname." at email ".$email."</p>"); } else { echo("<p>Message delivery failed...</p>"); } Quote Link to comment https://forums.phpfreaks.com/topic/74807-php-mail/ Share on other sites More sharing options...
jandrews3 Posted October 25, 2007 Author Share Posted October 25, 2007 I think I solved part of the issue. It appears the email address (my school email) wouldn't work as a destination but a newly created yahoo email address would. I guess there are some servers out there which don't allow the reception of php mail? Is that right? Quote Link to comment https://forums.phpfreaks.com/topic/74807-php-mail/#findComment-378256 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.