diff options
Diffstat (limited to 'pygm2n')
-rwxr-xr-x | pygm2n | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -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') |