Auto-send of email working. Clean up some connection database coding.