Add email settings
This commit is contained in:
parent
101058672b
commit
1781eb2875
4 changed files with 15 additions and 1 deletions
|
|
@ -193,7 +193,8 @@ STATICFILES_FINDERS = [
|
|||
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
|
||||
]
|
||||
|
||||
DEFAULT_FROM_EMAIL = "newsreader@rss.fudiggity.nl"
|
||||
# Email
|
||||
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
||||
|
||||
# Project settings
|
||||
VERSION = get_current_version()
|
||||
|
|
|
|||
|
|
@ -45,6 +45,15 @@ TEMPLATES = [
|
|||
}
|
||||
]
|
||||
|
||||
# Email
|
||||
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
|
||||
EMAIL_HOST = os.environ.get("EMAIL_HOST")
|
||||
EMAIL_PORT = os.environ.get("EMAIL_PORT")
|
||||
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER")
|
||||
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD")
|
||||
EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS")
|
||||
EMAIL_USE_SSL = os.environ.get("EMAIL_USE_SSL")
|
||||
|
||||
# Reddit integration
|
||||
REDDIT_CLIENT_ID = os.environ.get("REDDIT_CLIENT_ID", "")
|
||||
REDDIT_CLIENT_SECRET = os.environ.get("REDDIT_CLIENT_SECRET", "")
|
||||
|
|
|
|||
|
|
@ -106,6 +106,8 @@ class RedditTokenTask(app.Task):
|
|||
|
||||
user.reddit_refresh_token = None
|
||||
user.save()
|
||||
|
||||
# TODO add notification mail
|
||||
return
|
||||
|
||||
response_data = response.json()
|
||||
|
|
|
|||
|
|
@ -240,6 +240,8 @@ class TwitterClient(PostClient):
|
|||
stream.rule.user.twitter_oauth_token_secret = None
|
||||
stream.rule.user.save()
|
||||
|
||||
# TODO add notification mail
|
||||
|
||||
self.set_rule_error(stream.rule, e)
|
||||
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue