aboutsummaryrefslogtreecommitdiffstats
path: root/pygm2n
diff options
context:
space:
mode:
Diffstat (limited to 'pygm2n')
-rwxr-xr-xpygm2n11
1 files changed, 4 insertions, 7 deletions
diff --git a/pygm2n b/pygm2n
index 9c4e069..81561be 100755
--- a/pygm2n
+++ b/pygm2n
@@ -95,9 +95,7 @@ try:
format rfc 822 headers from input article
"""
- m2n.mergeheads() # make unique dict from NNTP and SMTP dicts
-
- m2n.heads_dict['X-Gateway'] = 'pyg {0} {1}'.format(
+ m2n.message['X-Gateway'] = 'pyg {0} {1}'.format(
mail2news.VERSION, mail2news.DESC)
m2n.renameheads() # rename useless heads
m2n.removeheads() # remove other heads
@@ -105,8 +103,7 @@ try:
m2n.sortheads() # sort remaining heads :)
if opt.verbose:
- for line in m2n.headers:
- print(line)
+ print(m2n.message.as_string())
"""phase 4:
open smtp connection and send e-mail
@@ -117,8 +114,8 @@ try:
if not opt.test:
try:
resp = m2n.sendemail()
- except nntplib.NNTPError, message:
- print(message)
+ except nntplib.NNTPError as ex:
+ print(ex)
except KeyboardInterrupt:
print('Keyboard Interrupt')