Skip to content

Instantly share code, notes, and snippets.

@vietvudanh
vietvudanh / EmailBackend.py
Created August 2, 2017 04:34 — forked from brianlittmann/EmailBackend.py
Remove Python's smtplib CRAM-MD5 authentication method if getting SMTPAuthenticationError: (535, 'Authentication failed') and you know credentials are correct.
# settings.py
EMAIL_BACKEND = 'backends.SMTPEmailBackend'
# backends.py
"""Custom SMTP email backend class"""
import smtplib
from django.core.mail.utils import DNS_NAME
from django.core.mail.backends.smtp import EmailBackend
class SMTPEmailBackend(EmailBackend):