I am new to Bluehost and Django and I am trying to setup a "password reset via email" function on my Bluehost server with Django. I've tried different combinations on setting the host and port number but for some reason it never worked. So here's what I had: (I am currently only working on my local computer.)
On Bluehost website where I can configure my email account, it lists:
Manual Settings
- Mail Server Username: admin+my_host.com
- Incoming Mail Server: mail.my_host.com
- Incoming Mail Server: (SSL) box664.bluehost.com
- Outgoing Mail Server: mail.my_host.com (server requires authentication) port 26
- Outgoing Mail Server: (SSL) box664.bluehost.com (server requires authentication) port 465
- Supported Incoming Mail Protocols: POP3, POP3S (SSL/TLS), IMAP, IMAPS (SSL/TLS)
- Supported Outgoing Mail Protocols: SMTP, SMTPS (SSL/TLS)
In settings.py I have the emails configured as: (I will list two combinations and the corresponding error message)
combination 1
DEFAULT_FROM_EMAIL = 'admin@my_host.com'
SERVER_EMAIL = 'admin@my_host.com'
EMAIL_USE_TLS = False
EMAIL_HOST = 'box664.bluehost.com'
EMAIL_HOST_PASSWORD = 'my_email_password'
EMAIL_HOST_USER = 'admin+my_host.com'
EMAIL_PORT = 465
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
error message: Exception Value: Connection unexpectedly closed
combination 2
DEFAULT_FROM_EMAIL = 'admin@my_host.com'
SERVER_EMAIL = 'admin@my_host.com'
EMAIL_USE_TLS = True
EMAIL_HOST = 'mail.my_host.com'
EMAIL_HOST_PASSWORD = 'my_email_password'
EMAIL_HOST_USER = 'admin+my_host.com'
EMAIL_PORT = 26
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
error message: Exception Value: (535, 'Incorrect authentication data')
Could anyone give me some suggestions where I did wrong? Any help is appreciated.