Can't use ezmail with non-ascii payload.
GoogleCodeExporter opened this issue · 1 comments
GoogleCodeExporter commented
Traceback (most recent call last):
File "/usr/local/bin/runtest", line 33, in <module>
sys.exit(runtest(sys.argv))
File "/usr/local/bin/runtest", line 21, in runtest
return tri(argv)
File "/usr/lib64/python2.7/site-packages/pycopia_QA-1.0.dev-py2.7.egg/pycopia/QA/shellinterface.py", line 218, in __call__
self.runner.finalize()
File "/usr/lib64/python2.7/site-packages/pycopia_QA-1.0.dev-py2.7.egg/pycopia/QA/testrunner.py", line 375, in finalize
rpt.finalize()
File "/usr/lib64/python2.7/site-packages/pycopia_QA-1.0.dev-py2.7.egg/pycopia/reports/Email.py", line 84, in finalize
ezmail.mail(self._message)
File "/usr/lib64/python2.7/site-packages/pycopia_core-1.0.dev-py2.7.egg/pycopia/ezmail.py", line 292, in mail
return ezmail(obj, To, From, subject, cc, bcc, extra_headers)
File "/usr/lib64/python2.7/site-packages/pycopia_core-1.0.dev-py2.7.egg/pycopia/ezmail.py", line 281, in ezmail
errs = outer.send(smtp)
File "/usr/lib64/python2.7/site-packages/pycopia_core-1.0.dev-py2.7.egg/pycopia/ezmail.py", line 106, in send
return smtp.sendmail(self.mail_from, self.rcpt_to, self.as_string(0), mopts, rcptopts)
File "/usr/lib64/python2.7/site-packages/pycopia_core-1.0.dev-py2.7.egg/pycopia/inet/SMTP.py", line 694, in sendmail
msg = msg.encode("ascii")
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position
29988: ordinal not in range(128)
Original issue reported on code.google.com by keith.d...@gmail.com
on 5 Apr 2014 at 12:57
GoogleCodeExporter commented
Made changes to allow non-ascii attachments. Tested with UTF-8 attachment
payload.
Original comment by keith.d...@gmail.com
on 25 Apr 2014 at 10:03
- Changed state: Fixed