I wanted to send an email with Django(1.5
), in my console it looked like the following:
In [30]: send_mail("bla", "here it is", "from_address@gmail.com",
["to_address@gmail.com"], fail_silently=False)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: bla
From: from_address@gmail.com
To: to_address@gmail.com
Date: Sat, 14 Dec 2013 11:56:37 -0000
Message-ID: <20131214115637.4720.60719@my_username-E531>
here it is
-------------------------------------------------------------------------------
Out[30]: 1
Eventually I found the problem was caused because EMAIL_BACKEND
(containing django.core.mail.backends.smtp.EmailBackend
) in settings.common.py
was being overwritten by EMAIL_BACKEND
(containing django.core.mail.backends.console.EmailBackend
) in settings.dev.py
with a different value.
The only explicit clue I had that something went wrong was Out[30]: 1
, as I understand an exit status of an unsuccessful run of a process.
- How come I didn't get any Python error?
- Was there a way to get the Python error for this error? If this was not possible how should I have debugged this properly?