Using multiple email address for posting mails from PHPMailer class![]() Let us say we have 5 address in an array
We will follow the instruction given on how to display elements of an array to display all the address.
Above code is a sample to display all email address but our requirement is to add them to our mail outgoing list. You can see our mail posting script using PHPMailer class here. To this script we will add the array looping like this.
Collecting email address from a tableLike above code we can collect all email address from a table and use them to send emails to all. You can read how to display data from table here. Same code we will use to add address to our phpmailer class.
Using BCCYou may not be interested to show all address to each member of your list, in such a case you can add BCC to each address. You can only change above line in respective AddAddress line.
This article is written by plus2net.com team.
![]() |
▼ More on PHP Mail |