There are several ways:[ol A][li]Loop through your recipients, sending an individual email address to each recipient.[/li][li]Use a CC: header[/li][li]Use a BCC: header[/li][/ol]
Just want to make sure that I am clear on your answer since I have 4 people to email to. I would have to loop through the code 4 times to send them an email.
My solution sends an independent email to each recipient. You'll have to loop through the list of emails, sending in each one in turn.
Chacalinc's solution would also require you to loop through all the emails, concatenating the addresses. That solution would send a single email, copies of which would be sent to all recipients.
The difference in the solutions depends on whether you want each of your recipients to see the email address of the others. I generally prefer that they not -- I am often sending emails to large numbers of people, and I don't want to clutter the "To:" field. Also, in this day and age of worms harvesting emails from users' inboxes, you don't want to make it easy for the worm to add to its collection.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.