aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail2news.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mail2news.py b/mail2news.py
index dd4758c..6e60d4c 100644
--- a/mail2news.py
+++ b/mail2news.py
@@ -27,7 +27,7 @@ from socket import gethostbyaddr, gethostname
import sys
-#logging.basicConfig(level=logging.DEBUG)
+# logging.basicConfig(level=logging.DEBUG)
# This is the single source of Truth
# Yes, it is awkward to have it assymetrically here
# and not in news2mail as well.
@@ -186,7 +186,9 @@ class mail2news(object):
if self.verbose:
server.set_debuglevel(2)
- server.post(StringIO(self.message.as_string()))
+ data = [x.encode() for x in self.message.as_string().split('\n')]
+ logging.debug('data = type %s', type(data))
+ server.post(data)
server.quit()