SendMail() - Multiple addresses

Joined: 11/28/2008

Brethren!

I am preparing (mentally anyway) to revamp my "Send Article to Friend" part of our site and a question has been on my mind for quite some time that I haven't been able to locate an answer to.

Question - Is there a way to enter multiple addresses in a Form field and then sendmail() to all the addresses?

On my own, I thought just a comma separated list might do it, but didn't. I've looked around for examples, but haven't found any....thoughts?

Thanks in advance. In Christ - Doug

New Brothers Fellowship

Joined: 11/28/2008
I'm sorry--what language are

I'm sorry--what language are we talking?

If the function itself doesn't support it, make an array out of the recipients and loop through it sending to each one.

Joined: 11/28/2008
So, address@one.com,

So,
address@one.com, address@two.com, address@three.com
doesn't work?
It's hard to visualize your problem. Can you post the url please?

Joined: 11/28/2008
With PHP mail(; you can use

With PHP mail(); you can use a comma separated list of email addresses. Is it possible for you to use PHP mail instead of Sendmail?

Joined: 11/28/2008
I see your website (LAM is

I see your website (LAM) is using PHP. The PHP mail() function as described here:

mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]])

Will allow multiple recipients by using "recipient1@domain.hld,recipient2@domain.hld,recipient3@domain.hld" as the "string to" in the above description.

Joined: 11/28/2008
Sorry about the language

Sorry about the language thing...php.

I think I can get a handle on what your saying about the array. Isn't there a function that will take a comma(or anything) separated list and build an array from it? That would be a helpful thing.
-----------------------
Woa...You all are gettin' ahead of me. I'm answering questions from two posts ago!! /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />

QUOTE
With PHP mail(); you can use a comma separated list of email addresses.  Is it possible for you to use PHP mail instead of Sendmail?

AND

mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]])

Will allow multiple recipients by using "recipient1@domain.hld,recipient2@domain.hld,recipient3@domain.hld" as the "string to" in the above description.

OK...you can see my razor dev knowledge coming through here...yes, php and the mail() function.

I must not have set up the addresses correctly the last time I tried. I'll attempt the comma separated method again and let you know how I fair.

I really appreciate the quick responses!
Many blessing to you both! - Thanks - Doug

New Brothers Fellowship

Joined: 11/28/2008
dgregan @ Sep 9 2003,
QUOTE(dgregan @ Sep 9 2003, 03:12 PM)
I think I can get a handle on what your saying about the array. Isn't there a function that will take a comma(or anything) separated list and build an array from it? That would be a helpful thing.

Yes, explode()

If you had a string such as

CODE
$string = "a/b/c/d";

and ran it through explode with "/" as the delimiter like this:

CODE
$parts = explode("/",$string)

you would come up with an array like this $parts[0=>a, 1=>b,2=>c,3=>4]