Modify

Opened 3 years ago

Last modified 21 months ago

#9085 new defect

Mails are not send by AnnouncerPlugin due to encoding error

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

Description (last modified by rjollos)

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 (5)

comment:1 Changed 3 years ago by anonymous

  • Priority changed from normal to lowest

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

comment:2 Changed 2 years ago by rjollos

  • Description modified (diff)

comment:3 Changed 21 months ago by hasienda

  • Keywords encoding added; AnnouncerPlugin removed
  • Owner changed from doki_pen to hasienda
  • Priority changed from lowest to low
  • Severity changed from blocker to major

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 21 months ago by psuter

comment:5 Changed 21 months ago by rjollos

  • Cc rjollos added

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.