View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0012515||mantisbt||feature||public||2010-11-05 07:22||2010-11-08 03:13|
|Summary||0012515: Simple script to send an additional email based upon status|
Simply schedule this script to run on a daily base and it will send grouped reminders to reporters whose issue has status feedback.
For version 1.2.0 and above, you can use the reminder plugin
|Tags||No tags attached.|
bug_feedback_mail.zip (1,176 bytes)
Good idea Cas!
Just some feedback to help you improve future patches/scripts/plugins:
Scripts such as this should be executed through the command line version of PHP. To prevent this file from being placed in the web root (where any user in the world can execute the script at will) you need to add a php_sapi_name() check as demonstrated in http://git.mantisbt.org/?p=mantisbt.git;a=blob;f=scripts/send_emails.php;h=ff3e81bac7dba82e4a98f15534322e38316cae75;hb=HEAD
Instead of using mysql functions from PHP, use the db functions from MantisBT to ensure that the script works for users running different database servers. Example: db_query_bound() instead of mysql_query().
RFC2822 section 2.1.1 (http://www.ietf.org/rfc/rfc2822.txt) limits the maximum number of characters per line in an email to 998 (not including the CR/LF at the end of each line). This would become an issue when sending long descriptions or bug notes to MantisBT users via email. This specification further recommends a maximum of 78 characters (not including CR/LF) per line in an email. AFAIK some of the MantisBT functions in email_api handle this for you, it's just a case of checking to ensure that the line length limitations are being adhered to.
The subject of the email you're sending could be more descriptive. Perhaps include (at a minimum) the bug tracker name so that people signed up to more than one bug tracker can distinguish between these daily digest emails?
Thanks for your continued development of plugins/scripts for MantisBT! Feel free to ask questions on the developer mailing list if you would like assistance at any point in time.
Thanks for the advice. Most of those are being practiced in the plugins.
Adjusted the script with the check and the generic db calls.
bug_feedback_mail2.zip (1,273 bytes)
|2010-11-05 07:22||cas||New Issue|
|2010-11-05 07:22||cas||File Added: bug_feedback_mail.zip|
|2010-11-07 07:10||dhx||Note Added: 0027275|
|2010-11-08 03:08||cas||Note Added: 0027282|
|2010-11-08 03:13||cas||File Added: bug_feedback_mail2.zip|
|2010-11-08 03:14||cas||Note Edited: 0027282||View Revisions|