Re: email with multiple records
| From: | Chris Lee | Date: | Wed, 07 Mar 2001 16:38:55 +0000 |
| Subject: | Re: email with multiple records | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-42929@lists.php.net to get a copy of this message | ||
suppy a code snippit and I would have a huge advantage here, but I'll swing in the dark on this
ok.
your looping all this in a for/while/foreach loop right. your generating the body like this ?
foreach($people as $pos => $val)
{
$email_body .= 'name is '. $people[$pos]['name'] ."\n";
$email_body .= 'email is '. $people[$pos]['email'] ."\n";
$email_body .= 'phone is '. $people[$pos]['phone'] ."\n";
mail($email_to, $email_body, $email_from);
}
right ? change it to this.
foreach($people as $pos => $val)
{
$email_body = '';
$email_body .= 'name is '. $people[$pos]['name'] ."\n";
$email_body .= 'email is '. $people[$pos]['email'] ."\n";
$email_body .= 'phone is '. $people[$pos]['phone'] ."\n";
mail($email_to, $email_body, $email_from);
}
now good change im out to lunch here, but sithout a code snippit im grabing here. please post
regarding, thank you.
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
lee@mediawaveonline.com
""WreckRman2"" <wreckrman2@combatfs.com> wrote in message news:MABBLAPKMKCPAFPFGAJKMEOPCKAA.wreckrman2@combatfs.com...
I wrote a small script like a email list only when I run it with 3 emails.
The first record gets his info, 2nd get his plus first, 3rd get his plus 2nd
and 1st. Why is it doing this?
David Smith
Number 3 record gets email with:
---------------------
Hi webmaster@indywebdesign.com,
Your email is webmaster@indywebdesign.com
Bye, WreckRman2
---
Hi wreckrman2@combatfs.com,
Your email is wreckrman2@combatfs.com
Bye, WreckRman2
----
Hi email@combatfs.com,
Your email is email@combatfs.com
Bye, WreckRman2
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net