pazz/alot — Issue #115: Unicode in mail headers causes problems when saving sent mail
Author: teythoon
Created: 2011-11-01 15:46:27+00:00
State: open

```
2: [envelope] to: "XXXXXXüXXX"
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/commands/envelope.py", line 122, in thread_code
os.write(write_fd, account.send_mail(mail) or 'success')
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/account.py", line 156, in send_mail
self.store_sent_mail(mail)
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/account.py", line 122, in store_sent_mail
self.store_mail(self.sent_box, mail)
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/account.py", line 111, in store_mail
mbx.add(mail)
File "/usr/lib/python2.7/mailbox.py", line 260, in add
self._dump_message(message, tmp_file)
File "/usr/lib/python2.7/mailbox.py", line 209, in _dump_message
buffer.seek(0)
File "/usr/lib/python2.7/StringIO.py", line 106, in seek
self.buf += ''.join(self.buflist)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 170: ordinal not in range(128)
```