Modify

Opened 13 years ago

Closed 7 years ago

#9085 closed defect (wontfix)

Mails are not send by AnnouncerPlugin due to encoding error

Reported by: anonymous Owned by:
Priority: low Component: AnnouncerPlugin
Severity: major Keywords: mail send error encoding
Cc: Ryan J Ollos Trac Release: 0.12

Description (last modified by Ryan J Ollos)

When doing any change which should start sending mails, no mails are delivered. Instead I get an error in the logs:

2011-08-11 17:08:04,491 Trac[main] DEBUG: Dispatching <Request "POST '/ticket/42'">
2011-08-11 17:08:04,492 Trac[session] DEBUG: Retrieving session for ID u'testuser'
2011-08-11 17:08:04,493 Trac[main] DEBUG: Negotiated locale: None -> en_GB
2011-08-11 17:08:04,501 Trac[api] INFO: Synchronized '' repository in 0.01 seconds
2011-08-11 17:08:04,503 Trac[perm] DEBUG: No policy allowed testuser performing TICKET_ADMIN on None
2011-08-11 17:08:04,518 Trac[api] DEBUG: AnnouncementSystem found the following subscribers capable of handling 'ticket, changed': LegacyTicketSubscriber, TicketComponentSubscriber, TicketCustomFieldSubscriber, JoinableGroupSubscriber, UserChangeSubscriber, WatchSubscriber
2011-08-11 17:08:04,518 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber added 'admin (authenticated)' because of rule: always_notify_component_owner
2011-08-11 17:08:04,519 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber added 'testuser (authenticated)' because of rule: always_notify_owner
2011-08-11 17:08:04,519 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber added 'testuser (authenticated)' because of rule: always_notify_reporter
2011-08-11 17:08:04,519 Trac[ticket_compat] DEBUG: LegacyTicketSubscriber added 'testuser (authenticated)' because of rule: always_notify_updater
2011-08-11 17:08:04,521 Trac[ticket_components] DEBUG: TicketComponentSubscriber added 'testuser (True)' for component 'Testcomponent'
2011-08-11 17:08:04,521 Trac[ticket_components] DEBUG: TicketComponentSubscriber added 'tester2 (True)' for component 'Testcomponent'
2011-08-11 17:08:04,523 Trac[api] DEBUG: AnnouncementSystem has found the following subscriptions: [tester2(authenticated) via email], [testuser(authenticated) via email], [admin(authenticated) via email]
2011-08-11 17:08:04,523 Trac[email_distributor] DEBUG: EmailDistributor has found the following formats capable of handling 'email' of 'ticket': text/html, text/plain
2011-08-11 17:08:04,524 Trac[email_distributor] DEBUG: EmailDistributor found the address 'tester@xxxxx.xx' for 'admin (authenticated)' via: SessionEmailResolver
2011-08-11 17:08:04,524 Trac[email_distributor] DEBUG: EmailDistributor determined the preferred format for 'tester2 (authenticated)' is: text/html
2011-08-11 17:08:04,524 Trac[email_distributor] DEBUG: EmailDistributor found the address 'tester2@xxxxx.xx' for 'tester2 (authenticated)' via: SpecifiedEmailResolver
2011-08-11 17:08:04,524 Trac[email_distributor] DEBUG: EmailDistributor determined the preferred format for 'testuser (authenticated)' is: text/html
2011-08-11 17:08:04,525 Trac[email_distributor] DEBUG: EmailDistributor found the address 'testuser@xxxxx.xx' for 'testuser (authenticated)' via: SessionEmailResolver
2011-08-11 17:08:04,525 Trac[email_distributor] DEBUG: EmailDistributor is sending event as 'text/html' to: tester@xxxxx.xx, tester2@xxxxx.xx
2011-08-11 17:08:04,561 Trac[api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
  File "/home/altrac/lib/python2.6/site-packages/TracAnnouncer-0.11.1_r10458-py2.6.egg/announcerplugin/api.py", line 369, in _real_send
    distributor.distribute(transport, packages[transport], evt)
  File "/home/altrac/lib/python2.6/site-packages/TracAnnouncer-0.11.1_r10458-py2.6.egg/announcerplugin/distributors/email_distributor.py", line 238, in distribute
    self._do_send(transport, event, k, v, fmtdict[k])
  File "/home/altrac/lib/python2.6/site-packages/TracAnnouncer-0.11.1_r10458-py2.6.egg/announcerplugin/distributors/email_distributor.py", line 325, in _do_send
    rootMessage.set_charset(self._charset)
  File "/usr/lib/python2.6/email/message.py", line 266, in set_charset
    cte(self)
  File "/usr/lib/python2.6/email/encoders.py", line 73, in encode_7or8bit
    orig.encode('ascii')
AttributeError: 'list' object has no attribute 'encode'

Attachments (0)

Change History (7)

comment:1 Changed 13 years ago by anonymous

Priority: normallowest

This bug only happens when mime_encoding is set to none, when setting it to base64, mails are delivered as expected ...

comment:2 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 11 years ago by Steffen Hoffmann

Keywords: encoding added; AnnouncerPlugin removed
Owner: changed from Robert Corsaro to Steffen Hoffmann
Priority: lowestlow
Severity: blockermajor

This is a surprising combination, that I can't agree to while aiming at some sane flags.

As you can get around it by choosing a suitable encoding, it's certainly not a blocker for you too.

comment:4 Changed 11 years ago by Peter Suter

comment:5 Changed 11 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed

comment:6 Changed 7 years ago by Ryan J Ollos

Owner: Steffen Hoffmann deleted

comment:7 Changed 7 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Please upgrade to Trac 1.2, which has integrated the core of AnnouncerPlugin. Please raise the issue on the trac:MailingList if you encounter the issue with Trac 1.2.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.