Settings:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_HOST = 'smtp.mailgun.org'
EMAIL_PORT = 587
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'passwordsecret'
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = '[email protected]'
SITE_ID = 2
Output in console:
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Testing email sending
From: [email protected]
To: [email protected]
Date: Tue, 13 Nov 2018 17:20:27 -0000
Message-ID <[email protected]>
View:
def index(request):
send_mail("Testing email sending", 'AS title','[email protected]',['[email protected]'], fail_silently=False)
return render(request, 'userpanel/index.html')
I get no errors but the email is not sent. What could be the issue?