Forum Moderators: coopster

Message Too Old, No Replies

Controling reply-to/From in PHP mail()

         

Christian SEO

12:44 am on Apr 5, 2003 (gmt 0)

10+ Year Member



I can now send mail, but the mail is arriving with a weird server address that includes the domain and I want to send it with a normal address. I got the following out of the PHP Manual:

mail("nobody@example.com", "the subject", $message,
"From: webmaster@$SERVER_NAME\r\n"
."Reply-To: webmaster@$SERVER_NAME\r\n"
."X-Mailer: PHP/" . phpversion());

and I've also tried:

mail($to,$subject,$message, "From: webmaster@domain\n Reply-To: webmaster@domain\n");

I keep getting:

From: www.domain.com@mckinley.web.pas.earthlink.net

and the "Return-Path:" is the same. None of my attempts to change it make any difference.

Thanks for your help!
Christian

Birdman

1:18 am on Apr 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



$recipient = "them@them.com";
$subject = "Subject";
$extra = "FROM: you@you.com";
$message = "message";
mail( [php.net]$recipient, $subject, $emessage, $extra);

That way works for me.

Christian SEO

2:08 am on Apr 5, 2003 (gmt 0)

10+ Year Member



Thanks Birdman...

Now it is for me too....!

Christian