SMTP AUTH extension not supported by server - Sending emails through a private host
Asked Answered
B

4

6

I registered a domain and a private email using namecheap.com. I am trying to send an email from this private email. However, I get the error in the title.

In my settings.py, I have these settings:

EMAIL_HOST = 'mail.privateemail.com'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'my password'
EMAIL_PORT = 587
EMAIL_USE_TLS = False
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER

And I am trying to send my mail through a view:

send_mail(
    'Subject here',
    'Here is the message.',
    '[email protected]',
    ['[email protected]'],
    fail_silently=False,
)

I get this error :

SMTP AUTH extension not supported by server.
Brassy answered 1/7, 2016 at 15:22 Comment(1)
Try adding SMTP_ENABLED = TrueCanaan
P
12

This is happening because you have conflicting settings:

EMAIL_PORT = 587        # Port 587 is reserved for TLS
EMAIL_USE_TLS = False   # But you have disabled TLS

You either need to set EMAIL_USE_TLS to True or use the default port for unencrypted connections (25).

Paginate answered 2/7, 2016 at 3:43 Comment(0)
L
4

I was searching answer for this since 4 hours. I still dont know why this configuration works for me, but yes, IT WORKS for me.

I simply removed,

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

from my settings.py, and add below configuration in settings.py

EMAIL_HOST = 'smtp.gmail.com'

EMAIL_HOST_USER = '[email protected]'

EMAIL_HOST_PASSWORD = 'mypassword'

EMAIL_PORT = 587

EMAIL_USE_TLS = True
Leora answered 30/9, 2016 at 12:8 Comment(0)
R
1

Remove the following config since "SMTP AUTH extension not supported by" your EMAIL_HOST:

EMAIL_HOST_PASSWORD = 'my password'
EMAIL_PORT = 587
Rugg answered 22/5, 2020 at 6:52 Comment(0)
S
0

I was using a server that is not Gmail by default and turns out to be a port issue, I found that I was using the wrong port, I changed it to 465 for SMTP with TLS, Thanks to this link..

So here are the settings I used:

EMAIL_PORT = 465       
EMAIL_USE_TLS = True
Shumate answered 6/11, 2020 at 20:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.