rsammy Posted May 15, 2007 Share Posted May 15, 2007 this is a block of code from my actual code... if (!isset($error)) { //print "Here"; $headers = ""; //$headers .= "From: $PHY_NAME<$PHY_EMAIL>\n"; $headers .= "From: $PHY_NAME\n"; $headers .= "X-Sender: <$PHY_EMAIL>\n"; $headers .= "X-Mailer: PHP\n"; // mailer $headers .= "X-Priority: 1\n"; // Urgent message! $headers .= "Return-Path: <$varreturnpath>\n"; // Return path for errors $message = $PHY_NAME."*".$PHY_EMAIL." has sent a message to you through ABC's message center. In order to get this message follow this link ".$varurlMC."\r\n\n PLEASE DO NOT REPLY TO THIS EMAIL AS THIS IS AN UNATTENDED, AUTO GENERATED EMAIL."; mail($to, "New XYZ Mail From: ".$PHY_NAME, $message, $headers); } how can i hide the senders email address from this or show something like this ... DoNotReply@xyz.com instead of the senders email address to prevent any reply to this message? Quote Link to comment https://forums.phpfreaks.com/topic/51556-solved-i-want-to-use-donotreplyxyzcom/ Share on other sites More sharing options...
phast1 Posted May 15, 2007 Share Posted May 15, 2007 I think you would want to change your "From:" header.. Something like this: $headers .= "From: DoNotReply <DoNotReply@xyz.com>\n"; You might also want to add a "Reply-To:" header set to the same thing, but I think the From: header should be enough.. Quote Link to comment https://forums.phpfreaks.com/topic/51556-solved-i-want-to-use-donotreplyxyzcom/#findComment-253897 Share on other sites More sharing options...
rsammy Posted May 16, 2007 Author Share Posted May 16, 2007 topic solved. thanx Quote Link to comment https://forums.phpfreaks.com/topic/51556-solved-i-want-to-use-donotreplyxyzcom/#findComment-254044 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.