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?

Thanks.
sdiekenAsked:
Who is Participating?
 
TomeeboyCommented:
Try changing the maximum script execution time in your PHP script:
http://www.php.net/set_time_limit

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

Hope that helps ;)
0
 
TomeeboyCommented:
You'll probably want to use some kind of mail class, such as PHPmailer:
http://phpmailer.sourceforge.net/

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:
http://www.phpfreaks.com/tutorials/130/0.php

Hope that helps!
0
 
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?
0
 
sdiekenAuthor Commented:
Please give me some idea please!
0
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.