summaryrefslogtreecommitdiff
path: root/postgresqleu/mailqueue/admin.py
AgeCommit message (Collapse)Author
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-04Fix sibling importsMagnus Hagander
Sibling imports should be prefixed with a period. Good idea in py2, will eventually become required in py3, so another small step.
2019-01-04Switch to new style try/except handlingMagnus Hagander
Python 2.6 introduced the better syntax, Python 3 removes the old one, so one small step towards py3.
2018-12-14Avoid multi-statement rowsMagnus Hagander
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!
2016-09-30Attempt to decode emails in hte queueMagnus Hagander
We only do very simple decoding, but even at this level it helps a lot with debugging messages going out of the system.
2014-01-01Clean up unused importsMagnus Hagander
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.