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
+try:
+ # Include email is settings are there
+ from karmaworld.secret.email import SMTP_HOST
+ from karmaworld.secret.email import SMTP_USERNAME
+ from karmaworld.secret.email import SMTP_PASSWORD
+ EMAIL = True
+except:
+ EMAIL = False
########## 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', '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', SMTP_PASSWORD)
-
-# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-user
-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)
-
-# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix
-EMAIL_SUBJECT_PREFIX = 'KarmaNotes '
-
-# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-use-tls
-EMAIL_USE_TLS = True
-
-DEFAULT_FROM_EMAIL = 'info@karmanotes.org'
-
-# See: https://docs.djangoproject.com/en/dev/ref/settings/#server-email
-SERVER_EMAIL = EMAIL_HOST_USER
+if EMAIL:
+ # 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_HOST)
+
+ # See: https://docs.djangoproject.com/en/dev/ref/settings/#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', SMTP_USERNAME)
+
+ # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-port
+ EMAIL_PORT = environ.get('EMAIL_PORT', 587)
+
+ # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix
+ EMAIL_SUBJECT_PREFIX = 'KarmaNotes '
+
+ # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-use-tls
+ EMAIL_USE_TLS = True
+
+ DEFAULT_FROM_EMAIL = 'info@karmanotes.org'
+
+ # See: https://docs.djangoproject.com/en/dev/ref/settings/#server-email
+ SERVER_EMAIL = EMAIL_HOST_USER
########## END EMAIL CONFIGURATION