Possible To Send Email Notification To All Members?
Quote from chad on December 10, 2018, 10:27 pmWe want to emulate the functionality of Google Groups. The only feature I couldn’t find is that ability to send an email to ALL members of the forum when a new topic is posted. Is this possible? (without manually subscribing)
thank you,
chad
We want to emulate the functionality of Google Groups. The only feature I couldn’t find is that ability to send an email to ALL members of the forum when a new topic is posted. Is this possible? (without manually subscribing)
thank you,
chad
Quote from Asgaros on December 11, 2018, 10:55 pmHello @chad
Currently there is no option for this available because of legal reasons. In a couple of countries there are strict privacy rules which dont allow you as a site-owner to send mails to users without their agreement. If you really want to do this its on your own risk.
In this case I think the asgarosforum_subscriber_mails_new_topic filter is the way to go. With this filter you can modify the array containing the mails of users who should get notified about a new topic right before the mails are sent.
Here is an example code which you can add to your themes functions.php file:
function notify_about_new_topic_mails($mails) { $users = get_users(); foreach ($users as $user) { if (!in_array($user->user_email, $mails)) { $mails[] = $user->user_email; } } return $mails; } add_filter('asgarosforum_subscriber_mails_new_topic', 'notify_about_new_topic_mails');
Hello @chad
Currently there is no option for this available because of legal reasons. In a couple of countries there are strict privacy rules which dont allow you as a site-owner to send mails to users without their agreement. If you really want to do this its on your own risk.
In this case I think the asgarosforum_subscriber_mails_new_topic filter is the way to go. With this filter you can modify the array containing the mails of users who should get notified about a new topic right before the mails are sent.
Here is an example code which you can add to your themes functions.php file:
function notify_about_new_topic_mails($mails) { $users = get_users(); foreach ($users as $user) { if (!in_array($user->user_email, $mails)) { $mails[] = $user->user_email; } } return $mails; } add_filter('asgarosforum_subscriber_mails_new_topic', 'notify_about_new_topic_mails');
Quote from chad on December 12, 2018, 3:08 pmOk, thank you! Understood about the legal issue. We are going to be a closed, private forum. All users will give permission to be emailed in this way.
thanks
Ok, thank you! Understood about the legal issue. We are going to be a closed, private forum. All users will give permission to be emailed in this way.
thanks