mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Log the wait before sending email
When waiting before sending email, log the wait. Fixes #1195173 [Feature Request - Multiple books emailed to device](https://bugs.launchpad.net/calibre/+bug/1195173)
This commit is contained in:
parent
c3009256c4
commit
f8509fe826
@ -92,7 +92,11 @@ class Sendmail(object):
|
||||
raise worker.exception
|
||||
|
||||
def sendmail(self, attachment, aname, to, subject, text, log):
|
||||
logged = False
|
||||
while time.time() - self.last_send_time <= self.rate_limit:
|
||||
if not logged:
|
||||
log('Waiting %s seconds before sending, to avoid being marked as spam.\nYou can control this delay via Preferences->Tweaks' % self.rate_limit)
|
||||
logged = True
|
||||
time.sleep(1)
|
||||
try:
|
||||
opts = email_config().parse()
|
||||
|
Loading…
x
Reference in New Issue
Block a user