dreamwidth/dw-free — pull request #799 by kareila (2014-07-12 06:17:45+00:00)
Title: (Bug 177) finished basic /admin/sendmail page

The requested scope of this bug is in three parts: send message, lookup sent
messages, and manage form messages. This is only the first of those three
parts.

This is a convenience form for sending emails to users from registered site
addresses such as support@dreamwidth.org. Each "from" address is tied to a
particular privilege using a new hash in config-local.pl named
%LJ::SENDMAIL_ACCOUNTS. The keys of the hash are the email account names
and the values of the hash are the priv:arg pairs needed to send a message
with that account.

The original bug spec said to use userlog to record when an email is sent.
I did that, but because userlog transactions are necessarily keyed to the
user who took the action and limited in how much additional information they
can contain, I also added a new global table, siteadmin_email_history, for
recording the details of each message sent. Due to the pressure of time,
the interface for looking up sent emails hasn't been added yet, but the
information is being added to the database for later querying.