[WIP] Use a queue + cron script to process emails

Fixes #261

Do not merge yet.