check if any connection first
This commit is contained in:
parent
7d7bc5b28e
commit
aa09425424
1 changed files with 3 additions and 2 deletions
|
@ -189,6 +189,7 @@ class MastodonEmailBridge:
|
||||||
|
|
||||||
def send_mail(self, data):
|
def send_mail(self, data):
|
||||||
'''Send an email with the post composed'''
|
'''Send an email with the post composed'''
|
||||||
|
if self.last_smtp_connection:
|
||||||
if time.time() - self.last_smtp_connection < 1:
|
if time.time() - self.last_smtp_connection < 1:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
sender = self._str_template(self.config['sender'], data)
|
sender = self._str_template(self.config['sender'], data)
|
||||||
|
|
Loading…
Reference in a new issue