Send Email to multi-recipients from Flash and PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Bakr
Forum Newbie
Posts: 2
Joined: Sat Oct 19, 2002 3:23 am

Send Email to multi-recipients from Flash and PHP

Post by Bakr »

Hello...is there anyone who could enlighten me on how to write a PHP script for sending email to multi-recipients. At the moment I could only send to 2 recipients but would like to send to at least 5 recipients to save repeated typing time. I will be using Flash as the front end and PHP to process the form.

Would really appreciate if there is someone who could help.

Thanks in advance.

Bakr of Singapore
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

http://www.php.net/manual/en/function.mail.php[quote]
bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]])
...
Multiple recipients can be specified by putting a comma between each address in to.[/quote]

Multiple parameters can be passed to PHP i.e. by naming the variables for the getURL-function like

Code: Select all

receipientї]=a@email.adr&receipientї]=b@email.adr
(Do not ask me about the flash part. getURL is something I just fetched the name ;) )


then you may iterate through this array i.e. with

Code: Select all

foreach($_POSTї'receipient'] as $recp)
   ...
or create a single string with http://www.php.net/manual/en/function.implode.php
Bakr
Forum Newbie
Posts: 2
Joined: Sat Oct 19, 2002 3:23 am

Thanks

Post by Bakr »

Many thanks Mr Volka for the info...I will look into it and see if I could get it to work.

Wish you all the best.
Post Reply