Page 1 of 1

send email to multiple adress

Posted: Mon Sep 08, 2008 12:46 am
by junjustkim
hi to all

I know how to send email in which address is from the user but it is only one email ads. I am planning to allow the user to send into multiple address using a comma or semi colon as a separator. But how can I extract that addresses and put into an array so that I can use loop. I want to use a split but i could not specified (list of variables) to be assigned from the split since I don't know how many addresses will be input from the users.

please give an advice

thanks in advance

Tirso

list($email,$email1) = split(',',$address);

Re: send email to multiple adress

Posted: Mon Sep 08, 2008 12:50 am
by josh
if you have the list of emails in an array, you could loop through them and build a header string to pass to the mail function, or whatever mailer you are using
( ie. if you were using phpmailer you could call the ->addBCC() method for each email )

Re: send email to multiple adress

Posted: Mon Sep 08, 2008 4:49 am
by junjustkim
Thanks for your immediate replied. Actually the list is came from the input field (type text) which inputted from the user using semi colon or even comma. My problem now is how I convert it into array in order for me to use a loop.

thanks

Re: send email to multiple adress

Posted: Mon Sep 08, 2008 8:53 am
by josh
explode()