Jump to content

[SOLVED] i want to use donotreply@xyz.com...


rsammy

Recommended Posts

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?

Link to comment
Share on other sites

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..

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.