|
1 | 1 | """Sending Roundup-specific mail over SMTP. |
2 | 2 | """ |
3 | 3 | __docformat__ = 'restructuredtext' |
4 | | -# $Id: mailer.py,v 1.22 2008-07-21 01:44:58 richard Exp $ |
5 | 4 |
|
6 | 5 | import time, quopri, os, socket, smtplib, re, sys, traceback, email |
7 | 6 |
|
@@ -117,7 +116,7 @@ def standard_message(self, to, subject, content, author=None): |
117 | 116 | message = self.get_standard_message(to, subject, author) |
118 | 117 | message.set_payload(content) |
119 | 118 | encode_quopri(message) |
120 | | - self.smtp_send(to, str(message)) |
| 119 | + self.smtp_send(to, message.as_string()) |
121 | 120 |
|
122 | 121 | def bounce_message(self, bounced_message, to, error, |
123 | 122 | subject='Failed issue tracker submission'): |
@@ -163,7 +162,7 @@ def bounce_message(self, bounced_message, to, error, |
163 | 162 |
|
164 | 163 | # send |
165 | 164 | try: |
166 | | - self.smtp_send(to, str(message)) |
| 165 | + self.smtp_send(to, message.as_string()) |
167 | 166 | except MessageSendError: |
168 | 167 | # squash mail sending errors when bouncing mail |
169 | 168 | # TODO this *could* be better, as we could notify admin of the |
|
0 commit comments