FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Multiple email Addresses





Dennise
I use the following for sending email as part of Form processing:

mail("me@domainname.xyz", $subject, $message, $from);

My question is this. How do you send the same email to multiple addresses?

1. add multiple email addresses in the same mail function line separated by commas?

2. add separate mail functions for each email using the same $subject, $message and $from variables in each?

3. other?

I tried #2 and it didn't work.

Rolling Eyes
Dennise
Using the mail function:

mail($to, $subject, $message, $from);

I set the variable $to like this:

$to = "recipient1@domaina.xyz, recipient2@domainb.zzz"

This didn't work if put the double mail string inside the mail function, but does work if I use the $to variable in the mail function.

Go figure
Rolling Eyes
Hogwarts
Use the Swift library.
Naif
I would recommend you to use a small, custom script instead of writing something so simple. There are many such scripts available for free. They take care of many fundamental things that you aren't taking care of at the moment.

Regards,
-- Naif
Related topics
Use gmail space & features for any email addr
a few email/parked domain questions..
Email Forwarding/Accounts Question
The evil 'email' button :(
Email Question
A good webmail client for multiple users
Email - which do you think is most secure?
sending email to multiple users.
Hi! newbie here
How Many Email Accounts Are Enough?
Subdomain Email Addresses
Page Based Email Issue
PHP script to create email addresses/ftp accounts/etc...
Internet Pet Peeves
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.