# Ticket #8740 (new defect)

Opened 2 years ago

Reported by: Assigned to: thomas.zerner@att.com hasienda normal AnnouncerPlugin critical email notification acct_mgr jbeilicke, rjollos, doki_pen 0.12

### Description

I have been testing the announcer plugin for awhile now to clear up the issue from the original notification system from Trac for ticket emails. The Announcer plugin does a great job with that but after implementation of the plugin with trac versions 12.0,12.1 & 12.2 we are no longer able to recieve an email for a Forgottten Password. I have tried the 11.1 version & the Development version 12.1 with versions 12.1 & 12.2 of trac still cannot get an eamil for a Forgotten Password. Any Ideas would be greatly appreciated.

Thanks Tom

## Change History

### 05/20/11 23:18:30 changed by David.Byrne@us.xchanging.com

• priority changed from normal to high.

I have noticed this as well. Also, I am using the verify email option in the AccountManager Plugin. These emails do not go out either. It looks like disabling the emails from the legacy system also disables the account emails (forgotten password or email verification). In my case, I've re-enabled the legacy announcer to get the account emails, but now I'm getting duplicate ticket emails.

### 07/11/11 15:00:22 changed by jbeilicke

• cc set to jbeilicke.

I have a similar issue, if not the same. When the mail was not sent, I noticed a Python exception in the debug log. It was caused by a typo. Unfortunately, the mail is still not being sent:

2011-07-11 14:35:54,730 Trac[api] INFO: Password reset user: testuser, testuser@example.org
2011-07-11 14:35:54,739 Trac[api] DEBUG: AnnouncementSystem has found the following subscriptions:
2011-07-11 14:35:54,739 Trac[api] DEBUG: AnnouncementSystem sent event in 0.0 seconds.
2011-07-11 14:35:54,740 Trac[api] INFO: Updated password for user: testuser
2011-07-11 14:35:54,742 Trac[api] DEBUG: AnnouncementSystem has found the following subscriptions:
2011-07-11 14:35:54,742 Trac[api] DEBUG: AnnouncementSystem sent event in 0.0 seconds.


I also tested the function by subscribing to a group before, with the same result.

### (follow-up: ↓ 5 ) 11/09/11 21:02:13 changed by David.Byrne@us.xchanging.com

• severity changed from normal to critical.

It looks like this will not work with the AccountManager plugin at all. There is a project on Trac-Hacks that is supposed to tie the two together (Announcer and AccountManager), but that project has no files. AccountManager calls NotifyEmail? from the base Trac system. That call looks at smtp_enabled in the notification section to be on or it returns without doing anything. I'm not sure what it would take to resolve this disconnect. If someone could point me in a general direction, I may see what I can do to fix this issue.

### (in reply to: ↑ 4 ) 11/15/11 00:01:12 changed by hasienda

• keywords set to email notification.

It looks like this will not work with the AccountManager plugin at all. [...] If someone could point me in a general direction, I may see what I can do to fix this issue.

How about pointing me onto this issue? I'm the current maintainer of AcctMgr and even the author of the aforementioned proposal to bind several plugins.

Certainly AcctMgr needs improvement regarding notifications/announcements, especially to be equally aware of both email transport backends. In this spirit it might even be related to #4895.

Please nudge me, if it seems to sink to low on my ToDo list, please.

### 11/15/11 15:28:41 changed by David.Byrne@us.xchanging.com

It looks like the fix described in #4895 where it suggests using

NotificationSystem(self.env).send_email(msg['From'], recipients, msgtext)


to send the email might fix the issue. At least, this would route the email through the IEmailSender interface which TracAnnouncer implements. It looks like this bug should really be attached to the AccountManager plugin instead of the TracAnnouncer plugin. I'm not sure if the fix above would cause any issues (like the email also going to individuals that it shouldn't).

I know that you are involved in developing (maintaining?) quite a few plugins at this time. If there is anything that I can help with, I wouldn't mind helping out. I am definitely not a Trac expert, but I have been programming with Python for a few years (at least 8 years).

### 08/01/12 14:44:35 changed by David.Byrne@us.xchanging.com

• cc changed from jbeilicke to jbeilicke, hasienda.

As mentioned before, this ticket should probably be attached to the AccountManager plugin. Since the AccountManager plugin is going through some code cleanup, is there any way that this ticket could be addressed?

### 08/01/12 15:00:13 changed by hasienda

Yes, this will happen soon.

I need to get that announcements working too, and I've already confirmed elsewhere that I'll commit time to fix this. I'm just dealing with some issues related to new user registration to help prepare the long-awaited t-h.o push towards a recent Trac release, but it's definitely high time to get serious about my old affiliation with TracAnnouncer. Thanks for pushing this.

### 10/21/12 14:38:08 changed by hasienda

• cc changed from jbeilicke, hasienda to jbeilicke, rjollos, doki_pen.
• priority changed from high to normal.
• owner changed from doki_pen to hasienda.

After "Ok" from Robert I'm formally taking over now too.

There are some more reports related to AccountManagerPlugin notifications, so let's join their level priority-wise too.

### 11/08/12 01:45:35 changed by hasienda

(In [12312]) TracAnnouncer: Update AccountManagerPlugin messaging support, refs #7759, #7977, #8740, #8927, #9090 and #9204.

This long-standing regression is fixed now, while associated message templates are rather bare-bone ones yet and formatting could be improved significantly.

### 11/09/12 01:17:52 changed by hasienda

(In [12325]) TracAnnouncer: Fix generator, that was broken by [12309], refs #7759, #7976, #7977, #8740, #8927, #9090 and #9204.

And the same bad filter code even got replicated in [12312]. Sorry for not checking compiler errors earlier. Finally I discovered an UnboundLocalError for resource_id hidden behind the first error. Obviously unit tests are a blessing and needed here too.

### 11/09/12 23:38:00 changed by hasienda

(In [12331]) TracAnnouncer: Really fix filter now, refs #7759, #7976, #7977, #8740, #8927, #9090 and #9204.

Complete the change from [12325] to get expected behavior, or filters would be applied undesirably.

### 11/11/12 23:36:47 changed by hasienda

(In [12342]) TracAnnouncer: Add 'acct_mgr' as default for 'filter_exception_realms' option, refs #7759, #7976, #7977, #8740, #8927, #9090 and #9204.

IMHO this is required for better plugin usability, making AccountManagerPlugin notifications pass without additional configuration effort now.

Some Python doc-string tweaks and another unit test slipped in here too.

### 11/15/12 01:13:44 changed by rjollos

(In [12353]) Refs #7759, #7976, #7977, #8740, #8927, #9090 and #9204: Fixed minor syntax error introduced in [12342].