aboutsummaryrefslogtreecommitdiffstats
path: root/pygm2n
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2014-12-22 02:40:39 +0100
committerMatěj Cepl <mcepl@cepl.eu>2014-12-22 02:40:39 +0100
commit45552a9cb1ac5433fd2010d1736b41a3393b9b6b (patch)
tree8e0e54e73deced9b3604c59b7f417d3592d9180d /pygm2n
parent5b25c51d3a02d49db2c7e33f9b65fad5432219f4 (diff)
downloadpygn-45552a9cb1ac5433fd2010d1736b41a3393b9b6b.tar.gz
pygm2n and mail2news also use email.Parser.
Diffstat (limited to 'pygm2n')
-rwxr-xr-xpygm2n9
1 files changed, 3 insertions, 6 deletions
diff --git a/pygm2n b/pygm2n
index 49d83c3..51869b3 100755
--- a/pygm2n
+++ b/pygm2n
@@ -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