I am trying to send activation email and reset email in Django. I am using Django registration module but after registration, the page returned back to the registration page and did not send any email to me. Part of settings.py :
DEBUG = False
ALLOWED_HOSTS = ['mysite.com', 'www.mysite.com']
EMAIL_BACKEND ='django.core.mail.backends.smtp.EmailBackend'
DEFAULT_FROM_EMAIL = '[email protected]'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'my pass'
EMAIL_USE_TLS = True
EMAIL_PORT = 1025
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'posts',
'registration',
'django_countries',
'crispy_forms',
'django_forms_bootstrap',
'captcha',
]
ACCOUNT_ACTIVATION_DAYS = 7
REGISTRATION_AUTO_LOGIN = True
SITE_ID = 1
After clicking on the register button, browser waits for 2 seconds on this page.
You forget to add
to send email.