0

I use allauth and want to send a verfication email.

ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = "mandatory"

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.ionos.com'
EMAIL_HOST_USER = 'info@mydomain.com'
EMAIL_HOST_PASSWORD = 'secretpassword'
EMAIL_PORT = 587

I use Ionos, the error which shown in browser:

SMTPAuthenticationError at /accounts/signup/
(535, b'Authentication credentials invalid')
Request Method: POST
Request URL:    http://127.0.0.1:8000/accounts/signup/
Django Version: 4.0.1
Exception Type: SMTPAuthenticationError
Exception Value:    
(535, b'Authentication credentials invalid')

The credentials are correct, maybe there's an error with the passwordencoding, or I'm doing it completly wrong. Do I need any smtp client in the django backend?

Strella
  • 340
  • 1
  • 9
  • 1
    `The credentials are correct`: Well, the server doesn't agree with you. Try using port `465` and if that doesn't work either consider opening a support ticket with Ionos. – Selcuk Mar 30 '22 at 04:45
  • thanks. No I've connection unexpectedly closed. – Strella Mar 30 '22 at 06:05

1 Answers1

0

I had to change the port and TLS so SSL now it's working

EMAIL_USE_SSL = True
EMAIL_HOST = 'smtp.ionos.com'
EMAIL_HOST_USER = 'info@mydomain.com'
EMAIL_HOST_PASSWORD = 'secretpassword'
EMAIL_PORT = 465
Strella
  • 340
  • 1
  • 9