MailMerge.Folder: Throttle sending rate to 30 per minute

This commit is contained in:
Michael Gratton 2020-08-15 11:37:14 +10:00 committed by Michael James Gratton
parent 182c498827
commit c3c134f09a

View file

@ -385,6 +385,10 @@ public class MailMerge.Folder : Geary.AbstractLocalFolder {
this.composed.unset(id);
this._properties.set_total(last);
notify_email_removed(Geary.Collection.single(id));
// Rate limit to ~30/minute for now
GLib.Timeout.add_seconds(2, this.send_loop.callback);
yield;
} catch (GLib.Error err) {
warning("Error sending merge email: %s", err.message);
send_error(err);