View Full Version : $to in mail() multiple user

10-29-2003, 04:04 PM

i have a site..visitor can send page to thier friend by entering the email address of their friends but only one at a time

so i hav a problem with the mail() function.. its abt the $to part of it..

i can send email to one email only at a time when i use $to but i want to send to more than one page by simply entering as


like this...

using only commas to separate..multiple addresses

how can it be done... ??

10-29-2003, 04:28 PM
from here (http://www.htmlite.com/php028.php) :

Additional recipient emails can be added to the first variable separating them by commas, not semicolons.

$to = "yourplace@somewhere.com,another@elsewhere.com";
Don't know if it works.

10-29-2003, 04:41 PM
It does work, Ive done this before..

10-29-2003, 05:01 PM
I ran into a problem where I had to replace the commas with semicolons, it ended up being something weird with the email server it was talking to.

Although most will take a comma seperated list.