django_email_multibackend
django_email_multibackend copied to clipboard
Backend can return None
django_email_multibackend/backends.py", line 126, in send_messages send_count += backend.send_messages(email_messages) TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'
what version of Django are you running?
1.4
def send_messages(self, email_messages):
"""
Sends one or more EmailMessage objects and returns the number of email
messages sent.
"""
if not email_messages:
return
self._lock.acquire()
try:
new_conn_created = self.open()
if not self.connection:
# We failed silently on open().
# Trying to send would be pointless.
return
num_sent = 0
for message in email_messages:
sent = self._send(message)
if sent:
num_sent += 1
if new_conn_created:
self.close()
finally:
self._lock.release()
return num_sent