Answers for "django send_mail not working in testcase"

0

django send_mail not working in testcase

# The Django test runner will actually configure a different email backend for you.
# To override it do the following

from django.test.utils import override_settings

@override_settings(
    EMAIL_BACKEND='django.core.mail.backends.smtp.EmailBackend')
def test_send_email_with_real_SMTP(self):
   # your code goes here....
Posted by: Guest on September-18-2021

Code answers related to "django send_mail not working in testcase"

Python Answers by Framework

Browse Popular Code Answers by Language