mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add a tweak to control the delay when sending mails using gmail or hotmail. Fixes #8064 (Email 5 Min. Added to Options)
This commit is contained in:
parent
5ff6540991
commit
82ffe9d107
@ -315,3 +315,11 @@ locale_for_sorting = ''
|
|||||||
# metadata one book at a time. If True, then the fields are laid out using two
|
# metadata one book at a time. If True, then the fields are laid out using two
|
||||||
# columns. If False, one column is used.
|
# columns. If False, one column is used.
|
||||||
metadata_single_use_2_cols_for_custom_fields = True
|
metadata_single_use_2_cols_for_custom_fields = True
|
||||||
|
|
||||||
|
# The number of seconds to wait before sending emails when using a
|
||||||
|
# public email server like gmail or hotmail. Default is: 5 minutes
|
||||||
|
# Setting it to lower may cause the server's SPAM controls to kick in,
|
||||||
|
# making email sending fail. Changes will take effect only after a restart of
|
||||||
|
# calibre.
|
||||||
|
public_smtp_relay_delay = 301
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ from calibre.customize.ui import available_input_formats, available_output_forma
|
|||||||
from calibre.ebooks.metadata import authors_to_string
|
from calibre.ebooks.metadata import authors_to_string
|
||||||
from calibre.constants import preferred_encoding
|
from calibre.constants import preferred_encoding
|
||||||
from calibre.gui2 import config, Dispatcher, warning_dialog
|
from calibre.gui2 import config, Dispatcher, warning_dialog
|
||||||
|
from calibre.utils.config import tweaks
|
||||||
|
|
||||||
class EmailJob(BaseJob): # {{{
|
class EmailJob(BaseJob): # {{{
|
||||||
|
|
||||||
@ -83,7 +84,7 @@ class Emailer(Thread): # {{{
|
|||||||
rh = opts.relay_host
|
rh = opts.relay_host
|
||||||
if rh and (
|
if rh and (
|
||||||
'gmail.com' in rh or 'live.com' in rh):
|
'gmail.com' in rh or 'live.com' in rh):
|
||||||
self.rate_limit = 301
|
self.rate_limit = tweaks['public_smtp_relay_delay']
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self._run = False
|
self._run = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user