On the backend side of how mail works, I think we should move to a queue based system. Messages to be sent are out into a queue and then automatically send once a minute via Cron. This could just be a table where messages are marked as sent (or failed and retried?) and then expired/cleaned up.
This decouples the browsing and mail sending, ensuring pages that send emails load smoothly.
--
Announcement: https://forum.itflow.org/d/191-attention-new-email-queue-system-breaking-changes-to-in-app-mailing/3