RE: [PHP] Headers in body - what am I doing wrong???

From: Date: Thu, 12 Jun 2003 17:14:49 +0000
Subject: RE: [PHP] Headers in body - what am I doing wrong???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-151274@lists.php.net to get a copy of this message
At 22:31 11-06-2003, Jennifer Goodie wrote:
// pull fields from form query $to = "maiser@metalbunny.net"; $name = $HTTP_POST_VARS['name']; $address = $HTTP_POST_VARS['address']; $listname = $HTTP_POST_VARS['listname']; $action = strtoupper($HTTP_POST_VARS['action']); // build headers $from = "\"$name\" <$address>\r\n"; $message = $action." ".$listname." ".$name."\r\n"; $message .= "EXIT\r\n"; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n"; $headers .= "From: ".$from."\r\n"; $headers .= "Reply-to: ".$from."\r\n"; You have an extra \r\n. There is one contained in the variable $from so the line $headers .= "From: ".$from."\r\n"; is putting \r\n\r\n which signifies the end of the headers and the begining of the message body.
Stupid me ... so simple, of course ... thanks ... first thing to go is the eyes... Rene -- Rene Brehmer aka Metalbunny http://metalbunny.net/ References, tools, and other useful stuff...

« previous php.general (#151274) next »