From: Charles Connell Date: Mon, 13 Jan 2014 23:59:53 +0000 (-0500) Subject: Email settings X-Git-Tag: release-20150131~240^2~18 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=113e8f8b49280d84dc2853b5cf91cb524cb910f6;p=oweals%2Fkarmaworld.git Email settings --- diff --git a/karmaworld/secret/email.py.example b/karmaworld/secret/email.py.example new file mode 100644 index 0000000..c0f726f --- /dev/null +++ b/karmaworld/secret/email.py.example @@ -0,0 +1,4 @@ + +SMTP_USERNAME = '' +SMTP_PASSWORD = '' + diff --git a/karmaworld/settings/common.py b/karmaworld/settings/common.py index 4b20c2f..580ffdb 100644 --- a/karmaworld/settings/common.py +++ b/karmaworld/settings/common.py @@ -23,7 +23,7 @@ DJANGO_ROOT = dirname(dirname(abspath(__file__))) SITE_ROOT = dirname(DJANGO_ROOT) # Site name: -SITE_NAME = basename(DJANGO_ROOT) +SITE_NAME = 'KarmaNotes' # Add our project to our pythonpath, this way we don't need to type our project # name in our dotted import paths: diff --git a/karmaworld/settings/prod.py b/karmaworld/settings/prod.py index b20e37e..d4560ee 100644 --- a/karmaworld/settings/prod.py +++ b/karmaworld/settings/prod.py @@ -22,18 +22,21 @@ from karmaworld.secret.db_settings import PROD_DB_NAME from karmaworld.secret.db_settings import PROD_DB_USERNAME from karmaworld.secret.db_settings import PROD_DB_PASSWORD +from karmaworld.secret.email import SMTP_USERNAME +from karmaworld.secret.email import SMTP_PASSWORD + ########## EMAIL CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host -EMAIL_HOST = environ.get('EMAIL_HOST', 'smtp.gmail.com') +EMAIL_HOST = environ.get('EMAIL_HOST', 'email-smtp.us-east-1.amazonaws.com') # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-password -EMAIL_HOST_PASSWORD = environ.get('EMAIL_HOST_PASSWORD', '') +EMAIL_HOST_PASSWORD = environ.get('EMAIL_HOST_PASSWORD', SMTP_PASSWORD) # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-user -EMAIL_HOST_USER = environ.get('EMAIL_HOST_USER', 'your_email@example.com') +EMAIL_HOST_USER = environ.get('EMAIL_HOST_USER', SMTP_USERNAME) # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-port EMAIL_PORT = environ.get('EMAIL_PORT', 587)