summaryrefslogtreecommitdiff
path: root/postgresqleu/mailqueue/models.py
AgeCommit message (Collapse)Author
2024-05-14Track regtime separate from sendtime on queued emailsMagnus Hagander
The regtime is always set to the extact time that an email was added. If a different sendtime is specified, it's still good to be able to track when something was added to the queue.
2019-10-29Fix default ordering of mailqueue tableMagnus Hagander
Normally this doesn't matter as all data in the table is very short-lived, but it's ueful when debugging.
2019-04-06Make the mail queue managable through the backend interfaceMagnus Hagander
This adds a viewer and editor for the mailqueue to the dashboard, superuser only. While at it, expose time and subject directly in the queue to make it easier to determine what is what. Most of the time this is not going to matter because emails are short-lived in the queue. But during development and definitely during debugging, it can be quite useful. Move the "parsed mail view" out of django admin and into the backend view so we don't have to maintain it twice. There is very little use for the admin view anymore, so it's OK to just show the raw data there.
2019-01-10Replace __unicode__ with __str__Magnus Hagander
2to3 doesn't do this automatically, probably because weird things can happen if you had both. We know we didn't, so just do a straight replacement.
2018-12-14Fix blankline related warningsMagnus Hagander
2018-12-14Replace tabs with spacesMagnus Hagander
In an effort to close up with PEP8, we should use spaces for indent rather than tabs... Time to update your editor config!
2013-04-19Add a simple mail queue in the databaseMagnus Hagander
Adds a function to call that will render a complete MIME message, and write the resulting text to a database table. Then there is a cron job that runs at regular intervals (every 5 mins or so) and sends all the queued emails. This brings in two important functions: * The ability to "send" emails from regular web views without the risk of ending up blocking on the SMTP server. * The abilitty to "transactionally send email" - meaning that mail sen this way will just disappear if the transaction (normally managed by django) that's open when it was sent ends up rolling back. This prevents re-sending email over and over again when some later step in the process fails.