diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-08-18 18:12:34 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-08-18 18:12:34 +0200 |
commit | 7febe6fa9b1c81105fe3f81677233182ff2712ac (patch) | |
tree | a6375994f05b163fe0128d1dacc1f4f080017804 /pyaggr3g470r | |
parent | Updated NEWS.rst. (diff) | |
download | newspipe-7febe6fa9b1c81105fe3f81677233182ff2712ac.tar.gz newspipe-7febe6fa9b1c81105fe3f81677233182ff2712ac.tar.bz2 newspipe-7febe6fa9b1c81105fe3f81677233182ff2712ac.zip |
Configuration variables has been updated.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r-- | pyaggr3g470r/crawler.py | 2 | ||||
-rw-r--r-- | pyaggr3g470r/emails.py | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/pyaggr3g470r/crawler.py b/pyaggr3g470r/crawler.py index 59d357b4..d65d03bd 100644 --- a/pyaggr3g470r/crawler.py +++ b/pyaggr3g470r/crawler.py @@ -112,7 +112,7 @@ class FeedGetter(object): self.index(new_articles) # 5 - Mail notification - if not conf.ON_HEROKU and conf.MAIL_ENABLED: + if not conf.ON_HEROKU and conf.NOTIFICATION_ENABLED: self.mail_notification(new_articles) logger.info("All articles retrieved. End of the processus.") diff --git a/pyaggr3g470r/emails.py b/pyaggr3g470r/emails.py index aba0e3e6..7d4d4c55 100644 --- a/pyaggr3g470r/emails.py +++ b/pyaggr3g470r/emails.py @@ -35,8 +35,8 @@ logger = logging.getLogger(__name__) @async def send_async_email(mfrom, mto, msg): try: - s = smtplib.SMTP(conf.MAIL_HOST) - s.login(conf.MAIL_USERNAME, conf.MAIL_PASSWORD) + s = smtplib.SMTP(conf.NOTIFICATION_HOST) + s.login(conf.NOTIFICATION_USERNAME, conf.NOTIFICATION_PASSWORD) except Exception: logger.exception('send_async_email raised:') else: @@ -69,8 +69,8 @@ def send_email(mfrom, mto, feed, article): msg.attach(part2) try: - s = smtplib.SMTP(conf.MAIL_HOST) - s.login(conf.MAIL_USERNAME, conf.MAIL_PASSWORD) + s = smtplib.SMTP(conf.NOTIFICATION_HOST) + s.login(conf.NOTIFICATION_USERNAME, conf.NOTIFICATION_PASSWORD) except Exception: logger.exception("send_email raised:") else: @@ -88,10 +88,10 @@ def send_heroku(user=None, bcc="", subject="", plaintext=""): try: message = PMMail(api_key = conf.POSTMARK_API_KEY, subject = subject, - sender = conf.ADMIN_EMAIL, + sender = conf.NOTIFICATION_EMAIL, text_body = plaintext) if bcc != "": - message.to = conf.ADMIN_EMAIL + message.to = conf.NOTIFICATION_EMAIL message.bcc = bcc elif bcc == "": message.to = user.email @@ -157,4 +157,4 @@ def new_article_notification(user, feed, article): if conf.ON_HEROKU: pass else: - send_email(conf.ADMIN_EMAIL, user.email, feed, article) + send_email(conf.NOTIFICATION_EMAIL, user.email, feed, article) |