Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Send email to all members when new discussion topic is created
sahilm
New
Hi,
In our forum their are around 18000 members, and what i need is that when any user posts a new discussion than email notification should be sent to all members that new topic for discussion is created.
Does anybody know how to process such huge emails and so achieve this ?
Thanks,
0
Comments
The theory is a queue:
Create a "Tasks" table that holds tasks which must be done
Hook into the AfterSaveDiscussion event and save a new task:
Create an endpoint that can be called by a cron job which reads one open task and processes it depending on the content.
If the tasks reads like the task above, split it into smaller parts:
The trick is to create one smaller task per user. And certainly you have to change the status of the first task!
If the task reads like one of the already split tasks, jut do it: send one mail to one user, changed status to "done" or delete task.
But this requires an external trigger. That should be a cron job.
I have already written a queue plugin, but I'm not able to judge if it was already finished: https://github.com/r-j/simplequeue