mlandauer / cuttlefish

Transactional email server with a lovely web interface
http://cuttlefish.io
Other
1.51k stars 176 forks source link

Simplify database schema by getting rid of emails table #368

Open mlandauer opened 4 years ago

mlandauer commented 4 years ago

Cuttlefish is focused on transactional email which almost always has a single recipient. So, in most cases we have a single email record which one delivery record attached. We could simplify things, only incurring a little extra overhead if we move all the data from the email table to the delivery table and get rid of the emails table.

So, when a user sends an email to multiple recipients it will get turned into two deliveries with duplicated data. This doesn't seem so bad.