summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9b02bd3)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
while True:
messages = self.get_all(limit=10)
while True:
messages = self.get_all(limit=10)
- for message in messages:
- self.send_msg(message)
- else:
+ # If no emails are available, we end here
+ if not messages:
+ for message in messages:
+ with self.db.transaction():
+ self.send_msg(message)
+
def send_to_all(self, recipients, subject, body, format=None):
"""
Sends an email to all recipients and does the translation.
def send_to_all(self, recipients, subject, body, format=None):
"""
Sends an email to all recipients and does the translation.