Fix problem with account selector

When sending a message, the account selector was ignoring
the account set by the before-edit hook.  Fix this
by running the hook before setting up the account selector.