Ticket #9148 (new enhancement)
Opened 23 months ago
Last modified 17 months ago
Add explicit always_notify and always_notify_bcc options to ticket system.
| Reported by: | jsiirola@… | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | unscheduled |
| Component: | notification | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
Many Trac instances make use of the smtp_always_bcc option to send all ticket notifications to a mailing list. This is problematic as many plugins (e.g. the AccountManager or TicketModerator) directly leverage the notification system to send non-public administrative email. The current workaround is for each plugin to either completely reimplement the notify() method or to hack the site configuration:
old_smtp_always_bcc = self.config.get('notification', 'smtp_always_bcc') # override the smtp_always_bcc option so that no emails are sent out to that address self.config.set('notification', 'smtp_always_bcc', '') try: NotifyEmail.notify(self, None, subject) finally: self.config.set('notification', 'smtp_always_bcc', old_smtp_always_bcc)
A better solution would be to add always_notify and always_notify_bcc options to the ticket system. These options would specify users/addresses to add to the CC / BCC recipient lists for all ticket emails. The former would be trivial to add (it would just return additional cc: addresses as part of the get_recipients() method). Adding bcc: addresses would probably require modifying the get_recipients() method to return a 3-element tuple (to, cc, bcc).
Attachments
Change History
comment:1 Changed 17 months ago by cboos
- Milestone set to unscheduled



PatchWelcome.