check if any connection first

This commit is contained in:
Antonio J. Delgado 2025-07-07 18:55:36 +03:00
parent 7d7bc5b28e
commit aa09425424

View file

@ -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)