Further database upgrades

Also, immediately schedule synchronization with Sent Mail when an
email is sent.