11๐
โ
You cannot use smpt.gmail.com
without providing your auth_information i.e your gmail password.
However you can put your auth information in a local_settings.py
and do not add this local_settings in version control so no one except you would see this file. Include this local_settings in your settings.py
.
settings.py
...
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
...
...
from local_settings import *
local_settings.py
EMAIL_HOST_USER = 'user@gmail.com'
EMAIL_HOST_PASSWORD = 'yourpassword'
๐คAkshar Raaj
9๐
try including this in settings.py
:
# Email configuration.
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'user@domain.com'
EMAIL_HOST_PASSWORD = 'yourpassword'
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = 'user@domain.com'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
If you have a web domain provider (like namecheap, godady, etc) you can associate you domain (mycompany.com) with Gmail. For that feature ask help in your domain provider or look info in Internet:
- http://www.namecheap.com/support/knowledgebase/article.aspx/1244/78/
- http://help.squarespace.com/customer/portal/articles/581494-how-do-i-set-up-google-apps-for-my-domain-
Hope it helps,
cheers.
๐คCartucho
- Installed pytest but running `pytest` in bash returns `not found`
- Django: Implementing a referral program
- Translating formatted strings in Django not working
- Determine if Django is running under the development server
Source:stackexchange.com