|
|
@ -169,7 +169,7 @@ class TaskEmail(CalibreTask):
|
|
|
|
except (MemoryError) as e:
|
|
|
|
except (MemoryError) as e:
|
|
|
|
log.exception(e)
|
|
|
|
log.exception(e)
|
|
|
|
self._handleError(u'MemoryError sending email: ' + str(e))
|
|
|
|
self._handleError(u'MemoryError sending email: ' + str(e))
|
|
|
|
return None
|
|
|
|
# return None
|
|
|
|
except (smtplib.SMTPException, smtplib.SMTPAuthenticationError) as e:
|
|
|
|
except (smtplib.SMTPException, smtplib.SMTPAuthenticationError) as e:
|
|
|
|
if hasattr(e, "smtp_error"):
|
|
|
|
if hasattr(e, "smtp_error"):
|
|
|
|
text = e.smtp_error.decode('utf-8').replace("\n", '. ')
|
|
|
|
text = e.smtp_error.decode('utf-8').replace("\n", '. ')
|
|
|
@ -181,10 +181,11 @@ class TaskEmail(CalibreTask):
|
|
|
|
log.exception(e)
|
|
|
|
log.exception(e)
|
|
|
|
text = ''
|
|
|
|
text = ''
|
|
|
|
self._handleError(u'Smtplib Error sending email: ' + text)
|
|
|
|
self._handleError(u'Smtplib Error sending email: ' + text)
|
|
|
|
return None
|
|
|
|
# return None
|
|
|
|
except (socket.error) as e:
|
|
|
|
except (socket.error) as e:
|
|
|
|
self._handleError(u'Socket Error sending email: ' + e.strerror)
|
|
|
|
self._handleError(u'Socket Error sending email: ' + e.strerror)
|
|
|
|
return None
|
|
|
|
# return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
@property
|
|
|
|
def progress(self):
|
|
|
|
def progress(self):
|
|
|
|