Topic: sending multiple mails
I want to know how to send mails to multiple email addresses using PHP code.
Thanks.
You are not logged in. Please login or register.
PunBB Forums → Programming → sending multiple mails
I want to know how to send mails to multiple email addresses using PHP code.
Thanks.
Use an array & a foreach loop.
E.g.
$adress = array('some@adress.com', 'another@adress.com', 'yetanother@adress.com');
foreach ($adress as $sendto) {
YOUR MAIL CODE HERE. EACH ADRESS IS STORED INTO THE '$sendto' VARIABLE.
}
That would be a simple way of doing it, but it all depens on how you want the script to work, where you're getting the data from etc..
Yes the Simple way of coding is using "Looping Structures".
PunBB Forums → Programming → sending multiple mails
Powered by PunBB, supported by Informer Technologies, Inc.