Send a mail to a group of people

Hi all,

My site allows visitor to choose a mark of category. For example, my site has 3 categories : A, B and C. Now I want to send a mail to a group of visitor. For example, I want to send a mail to all visitor who chose A. I want to send only one mail then that mail will forward to all visitor who chose category A. How can I do that esily?

Who is Participating?
Try changing the maximum script execution time in your PHP script:

It would also help to break up your emails into batches and send one batch at a time.

Hope that helps ;)
You'll probably want to use some kind of mail class, such as PHPmailer:

Then, for what you're wanting to do, you would need to build a BCC (blind carbon copy) list of email addresses to send your emails to (which could be done by looping through a result array of email addresses queried from your database, based on the chosen category).

Here's a guide that will show you how to use PHPmailer for things like BCC:

Hope that helps!
sdiekenAuthor Commented:
Yes! I used to do it. But some problems occur when there are many emails to send. The script will be time out :(
Do you understand what I mean? How can I solve this problem?
sdiekenAuthor Commented:
Please give me some idea please!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.