Email isnt sending

Hey,

I have an issue, in the information of my hoster it says I should use the Port 25 in my Settings.

If I do that this error appears:

SMTPNotSupportedError
STARTTLS extension not supported by server.

and if I use the port 587 (because in the Internet many people have this port), no error appears but the mail isnt sending. The problem is not from my hoster because if I send emails manually they’re delivered.

This is how everything should be:

I wanted to use the right one SMTP.

This is my settings.py

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'cmail01.mailhost24.de'
EMAIL_PORT = 25
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'info@divusx.com'
EMAIL_HOST_PASSWORD = 'passwordhereobviously'

You’ll want to do something to increase the logging going on between your code and the mail server.

There are many reasons why a mail server may reject an email for delivery, and very few of them are designed to show an Error on the senders side. (And, it’s perfectly valid for the recipient to reject an email with no notice at all. Email is not a “guaranteed delivery” mechanism, it’s a “best effort” system.)

It’d start with setting up debug-level logging on the django.core.email module and see what that gets you.

You might also try using an email client that logs the complete exchange and try to send the emails through it.

(For example, I’ve got an email server whose IP address is on an AT&T reject list. Everyone I try to send an email to gets it, except for those with an att.com address. There, I get an error message saying my originating IP address is rejected.)

Sometimes, dealing with email delivery is not fun.