Re: Headers in body - what am I doing wrong???

From: Date: Wed, 11 Jun 2003 21:48:55 +0000
Subject: Re: Headers in body - what am I doing wrong???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-151157@lists.php.net to get a copy of this message
When using my yahoo account as test-target for this script, I get this in return from my Mercury server: == quote from error message == The mail server has encountered errors processing your request: * Unrecognized command "Reply-to:". From: "DeltaPower" <dpower076@yahoo.dk> Reply-to: "DeltaPower" <dpower076@yahoo.dk> Obviously, there's an extra line between the From and the Reply-to field, which is why Mercury thinks the reply-to is in the body. Mercury is made (or setup, not sure which) so that it will stop processing when it finds something it doesn't understand. I use the reply to field just as a safety measure ... Any ideas y'all ???
You are already pretty far in determining the problem. Indeed the border between the header and content of a mail is an empty line. What if i just give a hint? Look closely: $from = "\"$name\" <$address>\r\n"; $headers .= "From: ".$from."\r\n"; See ? Chris PS some mailservers do not like \r\n, check the manual on mail() and see what they suggest, i think it was just \n.

« previous php.general (#151157) next »