(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.
I was thinking that this looked suspiciously similar to the "my $foo = bar if blah" pattern, which causes problems, but I think that this goes the other way.

Still, I think I'd prefer assign in one line and then error check in the next. Or maybe assign in bulk at the beginning then do all the error checks.

The other thing I'm thinking here is usability. If you had something wrong, you'd have to go back, hope your changes were retained, make your changes and then submit again. If you had more than one error, you'd have to do that multiple times.

What I'd suggest instead is that, if we have an error message, to have the page refresh, showing the same form.

I've thrown up a quick wiki page / example of how to do that here:

http://wiki.dreamwidth.net/wiki/index.php/Error_Handling