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 ... [email protected] instead of the senders email address to prevent any reply to this message? 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 <[email protected]>\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.. 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 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
Archived
This topic is now archived and is closed to further replies.