In one of my module, i have created a checkbox on user account page. If user has checked that checkbox at that time an email is sent to all the user when any specific node is created. Lets say when any article node is created then all the users who has checked the checkbox will be notified by the email when node is posted.
Now for the scenario given below:
- Lets say if my site has 1000 users who has checked the checkbox/
- Simultaneously 10 users are creating the node.
- When only 10 users are creating the node simultaneously 1000 * 10 = 10000 emails will be sent at time.
- I am not sure whether site will able to handle it or not.
So i want the suggestion that is there any way to queue email and send them after certain intervals like 1000 mails after an hour, 1000 after second hour 1000 after 3rd hour and so on. Or any other nice solution.