Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.
like image 467
darkhorse Avatar asked Jul 01 '16 15:07

darkhorse


People also ask

How do I fix SMTP AUTH for message submission on port 587?

Check Port is set to 587 and Use TLS/SSL is checked. Click the Authentication drop-down list and select Password. Double-check your SMTP settings and then click OK. Host Name: mail.example.com, replacing example.com with your domain name.

How do I fix 550 SMTP AUTH for message submission on port 587?

In Thunderbird, under 'Tools' select 'Account Settings'. Select 'Outgoing Server (SMTP)' and click 'Edit'. Enable the 'Use name and password' option. Under 'Security and Authentication', enable STARTTLS as the 'Connection security'.


2 Answers

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).

like image 193
solarissmoke Avatar answered Oct 15 '22 17:10

solarissmoke


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
like image 40
Akash Wankhede Avatar answered Oct 15 '22 18:10

Akash Wankhede