We've installed MantisBT on our web server and have Email notifications enabled.
Currently, a separate Email is sent for each applicable event.
Is there any way for a user to request that the notifications be sent to them as a single daily digest email? Rather than receiving a separate Email for each notification?
Version Info:
MantisBT v2.17.1
PHP 5.6.36
MySQL 5.6.39
Apache 2.6.32
receiving email notifications via a daily digest
Moderators: Developer, Contributor
Re: receiving email notifications via a daily digest
Not possible out of the box.
Might help
https://www.mantisbt.org/bugs/view.php?id=12515
https://www.mantisbt.org/wiki/doku.php/ ... s:reminder
Might help
https://www.mantisbt.org/bugs/view.php?id=12515
https://www.mantisbt.org/wiki/doku.php/ ... s:reminder
Re: receiving email notifications via a daily digest
Thanks for the reply! Looks like it may be worth spending some time to develop a plug-in. For now I've asked those who requested it to setup an inbox filter so all the notifications go into a folder. Having a digest would be a nice per-user option though.
Re: receiving email notifications via a daily digest
I did some reading in the developer docs on plug-ins. Here's how I'm thinking it could work.
- intercept sending Email notifications
- check global preference and/or user specific setting for a digest preference and only continue if applicable
- rather than sending the EMail, log the notification in a table
- have a periodic script, runnable via cron that works through the table used above and for each user groups and formats all their notifications into a single digest Email
- setup a cron job to run the script daily
Re: receiving email notifications via a daily digest
I can't invest a lot of time in this, thus just a few hints that might help.
http://mantisbt.org/docs/master/en-US/A ... nfig.email
No need to implement it yourself, this is exactly how Mantis notifications work, use this function from core/email_api.php for it
Code: Select all
/**
* Store email in queue for sending
*
* @param string $p_recipient Email recipient address.
* @param string $p_subject Subject of email message.
* @param string $p_message Body text of email message.
* @param array $p_headers Array of additional headers to send with the email.
* @param boolean $p_force True to force sending of emails in shutdown function,
* even when using cronjob
* @return integer|null
*/
function email_store( $p_recipient, $p_subject, $p_message, array $p_headers = null, $p_force = false )
Have a look at scripts/send_emails.php and check option $g_email_send_using_cronjob in Admin Guide
http://mantisbt.org/docs/master/en-US/A ... nfig.email
Re: receiving email notifications via a daily digest
Thanks for the reply and the hints. I'll try and dig into that if I can find some time to do so.