jandrews3 Posted August 8, 2008 Share Posted August 8, 2008 The test emails I send with this script keep showing that they come from "jamesa3.com". While that is the site I'm sending from, I'm using what I thought were proper headers to make it show "[email protected]". $tom = $row['emailm']; $tof = $row['emailf']; $headers = "From: [email protected]\r\n" . "X-Mailer: php". "Return-Path: [email protected]\r\n"; if (mail($tom, $subject, $message, $headers)){print "Sent to - ".$row['guardianm']." (".$row['lname'].", ".$row['fname'].")";} else {print "<b>MESSAGE DELIVERY FAILED FOR ".$tom;} Link to comment https://forums.phpfreaks.com/topic/118825-php-email/ Share on other sites More sharing options...
DarkWater Posted August 8, 2008 Share Posted August 8, 2008 I think some servers don't allow you to set a From header when sending mails so you don't spoof emails. >_> Inquire about it with your hosting company. Link to comment https://forums.phpfreaks.com/topic/118825-php-email/#findComment-611833 Share on other sites More sharing options...
jandrews3 Posted August 8, 2008 Author Share Posted August 8, 2008 Looks like that's it. I moved the file to another server and it worked properly. Does anyone know of a work-around where I can force it to work on sites where it might not normally? Link to comment https://forums.phpfreaks.com/topic/118825-php-email/#findComment-611846 Share on other sites More sharing options...
DarkWater Posted August 8, 2008 Share Posted August 8, 2008 Nope, sorry. Link to comment https://forums.phpfreaks.com/topic/118825-php-email/#findComment-611853 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.