Opened 13 years ago

Last modified 7 years ago

#9085 closed defect

Mails are not send by AnnouncerPlugin due to encoding error — at Version 2

Reported by: anonymous Owned by: Robert Corsaro
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'

Change History (2)

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)
Note: See TracTickets for help on using tickets.