diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2014-12-22 02:40:39 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2014-12-22 02:40:39 +0100 |
commit | 45552a9cb1ac5433fd2010d1736b41a3393b9b6b (patch) | |
tree | 8e0e54e73deced9b3604c59b7f417d3592d9180d /pygm2n | |
parent | 5b25c51d3a02d49db2c7e33f9b65fad5432219f4 (diff) | |
download | pyg-45552a9cb1ac5433fd2010d1736b41a3393b9b6b.tar.gz |
pygm2n and mail2news also use email.Parser.
Diffstat (limited to 'pygm2n')
-rwxr-xr-x | pygm2n | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -14,18 +14,15 @@ Thanks to md for this useful formula. Beer is beer. Gets news article and sends it via SMTP. """ from __future__ import print_function + import logging import sys - import argparse import mail2news import pyginfo -logging.basicConfig(format='%(levelname)s:%(funcName)s:%(message)s', - level=logging.DEBUG) - sys.path.append('/usr/lib/pyg') @@ -88,7 +85,7 @@ try: # reads stdin and parses article separating head from body m2n.readfile(opt) - m2n.parseemail() + # m2n.parseemail() """phase 2: check whitelist for user's permission @@ -108,7 +105,7 @@ try: if opt.verbose: for line in m2n.headers: - print(line[:-1]) + print(line) """phase 4: open smtp connection and send e-mail |