mail() problem...

From: Date: Wed, 03 Apr 2002 21:15:36 +0000
Subject: mail() problem...
Groups: php.general 
Request: Send a blank email to php-general+get-91408@lists.php.net to get a copy of this message
I wrote a small piece of code to take a text file with a list of email addresses in it one per line and send out an email to each of them like so... $headers = "From: me@mydomain.com\r\n"; $headers .= "Reply-To: myreply@mydomain.com\r\n"; $message = "Blah Blah Blah"; $subject = "Subject of the message"; $arrText = file("test.txt"); for ($i=0; $i<count($arrText); $i++) { mail("$arrText[$i]", $subject, $message, $headers); } When received, the message shows up from root with no subject and the additional headers are in the body of the message.. When I manually specify an email address instead of $arrText[$i] it comes thru as expected showing the additional headers where they should be. Does anyone have a suggestion on this? Thanks in advance, Jack Davis

« previous php.general (#91408) next »