Re: Multiple To:'s in mail()
| From: | Philip Olson | Date: | Tue, 02 Jan 2001 22:36:16 +0000 |
| Subject: | Re: Multiple To:'s in mail() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32388@lists.php.net to get a copy of this message | ||
Yes, you will want to use loop.
Firstly, setup multiple select box correctly with an array :
<select name="email1[]" multiple>
During processing, try this test :
foreach ($email1 as $address) {
print "<br>$address";
}
It should give idea as during this loop you'll be using mail()
with $address as the recipient.
Regards,
philip
On Tue, 2 Jan 2001, Jeremy Bowen wrote:
> Hey,
>
> I need to be able to send multiple e-mail's via one form on a website.
>
> What I need to have for the user is two selection boxes with multiple e-mail
> addresses in each, like this:
>
> <select name=email1 multiple>
> <option value=User1 <user1@domain.com>User1</option>
> <option value=User2 <user2@domain.com>User2</option>
> <option value=User3 <user3@domain.com>User3</option>
> <option value=User4 <user4@domain.com>User4</option>
> </select>
>
> <select name=email2 multiple>
> <option value=User1 <user1@domain.com>User1</option>
> <option value=User2 <user2@domain.com>User2</option>
> <option value=User3 <user3@domain.com>User3</option>
> <option value=User4 <user4@domain.com>User4</option>
> </select>
>
> I am not sure how to pass the e-mail addresses to the script. What I need to
> have is individula e-mails so that the people that have the e-mails sent to the
> do not know the addresses of the other people that it was sent to. The e-mails
> need to look like they are all individual e-mails.
>
> Is there any way to do this? Do i need some sort of loop or something?
>
> Thanks,
> Jeremy
>
> --
> 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
>