]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
no bug - tie secbugstats to bugzilla email (#404)
authorDylan William Hardison <dylan@hardison.net>
Tue, 20 Feb 2018 13:56:48 +0000 (08:56 -0500)
committerGitHub <noreply@github.com>
Tue, 20 Feb 2018 13:56:48 +0000 (08:56 -0500)
contrib/secbugstats/bin/gather.sh
contrib/secbugstats/bin/sendstats.py

index 6787527625c6bd5f1eb10555766000704bacd6bd..fd7de76205b34ae9a10cabed142db7ac91d92d5f 100755 (executable)
@@ -54,5 +54,5 @@ echo "[end graph.py]"
 
 # # Email the report
 echo "[sendstats.py `date +%Y-%m-%d\ %T`]"
-$SCRIPTS_DIR/sendstats.py
+$SCRIPTS_DIR/sendstats.py | perl scripts/sendmail.pl
 echo "[end sendstats.py]"
index 32d2965336850901ede9add76811dc1a2b7041df..2df8bfd6b25f644886653244c72171e749685b7a 100755 (executable)
@@ -293,15 +293,4 @@ if img:
     msgImage.add_header("Content-ID", "<image1>")
     msgRoot.attach(msgImage)
 
-# if console is chosen, print only to the console
-if "--console" in sys.argv:
-    print "\n", msgRoot.as_string()
-# print out only HTML body
-elif "--html" in sys.argv:
-    print "\n", body
-# send out the mail
-else:
-    s = smtplib.SMTP(SMTP_HOST, SMTP_PORT)
-    # s = smtplib.SMTP_SSL(SMTP_HOST, SMTP_PORT)
-    # s.login(LDAP_USER, LDAP_PASS)
-    s.sendmail(EMAIL_FROM, EMAIL_TO, msgRoot.as_string())
+print msgRoot.as_string()