value of an array into a sendmail function

From: Date: Tue, 05 Mar 2002 20:28:49 +0000
Subject: value of an array into a sendmail function
Groups: php.general 
Request: Send a blank email to php-general+get-87336@lists.php.net to get a copy of this message
I want to take the value of an array and define it as $message. This variable will be called in the sendmail function mail(). Here is what I have so far. (does not work!) Can anyone help me with this problem? $automail = file("DOCUMENT_ROOT/BetterBus/1/AutoEmail.txt"); $number_of_lines = count($automail); for ( $i=0; $i<$number_of_lines; $i++) { $auto = explode("\n", $automail[$i]); echo $auto[0]."\n"; } $to = $EMAILADDRESS $subject = "Thank You for your submission!"; $message = eval($automail); $fromaddress = "email@email.com"; mail($to, $subject, $message, $fromaddress);

« previous php.general (#87336) next »