Skip to content

Commit 2239097

Browse files
Merge pull request #33 from app-generator/smtp
fixed-smtp
2 parents a4c8f6a + 34f7ffd commit 2239097

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

core/settings.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,16 @@
207207

208208

209209
LOGIN_REDIRECT_URL = '/'
210-
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
210+
# EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
211+
212+
213+
214+
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
215+
EMAIL_HOST = os.environ.get('EMAIL_HOST', 'smtp.gmail.com')
216+
EMAIL_PORT = os.environ.get('EMAIL_PORT', 587)
217+
EMAIL_USE_TLS = os.environ.get('EMAIL_USE_TLS', True)
218+
EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER',)
219+
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
211220

212221
# ### API-GENERATOR Settings ###
213222
API_GENERATOR = {

env.sample

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ SECRET_KEY=<STRONG_KEY_HERE>
88
# DB_USERNAME=appseed_db_usr
99
# DB_PASS=pass
1010
# DB_PORT=3306
11+
12+
EMAIL_HOST=smtp.gmail.com
13+
EMAIL_PORT=587
14+
EMAIL_USE_TLS=True
15+
EMAIL_HOST_USER=
16+
EMAIL_HOST_PASSWORD=

0 commit comments

Comments
 (0)