note 24889 rejected from function.mail by victor

From: Date: Wed, 04 Sep 2002 04:37:17 +0000
Subject: note 24889 rejected from function.mail by victor
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-36089@lists.php.net to get a copy of this message
I'm using PHP4.2.2 on FreeBSD, there is a strange things that happaned when I try to send mail with extra headers. When I use this: $Headers = "From: info@$SERVER_NAME\r\nReply-To: info@$SERVER_NAME"; mail($To, "$SERVER_NAME Order Confirmation", $Message, $Headers); I receive the message, but From is not correct and Reply-To is not correct too, the domain of the From and Reply-To mail addresses are replaced with the real hostname. Let's say I have a virtual web host, hosted at realdomain.com, and a virtual name my_name.com, and in headers, it must be info@my_name.com, but it's appear as info@realdomain.com. If I just use mail($To, $Subject, $Message, "From: info@my_name.com\r\nReply-To: info@my_name.com"); everything is OK, but I want to use this script on multiple domains. Where is the problem??

« previous php.notes (#36089) next »