RE: [PHP] value of an array into a sendmail function
| From: | Demitrious S. Kelly | Date: | Tue, 05 Mar 2002 20:29:15 +0000 |
| Subject: | RE: [PHP] value of an array into a sendmail function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87338@lists.php.net to get a copy of this message | ||
$mail='';
foreach($automail as $mailline) {
$mail.=$mailline;
}
$to = $EMAILADDRESS
$subject = "Thank You for your submission!";
$message = eval($automail);
$fromaddress = "email@email.com";
mail($to, $subject, $mail, $fromaddress);
that's my $.02
-----Original Message-----
From: Kris Vose [mailto:KVose@alidaconnection.com]
Sent: Tuesday, March 05, 2002 12:29 PM
To: php-general@lists.php.net
Subject: [PHP] value of an array into a sendmail function
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);