Send code restructured (as in D83)
WIP

Test Plan:
Works as before -
Use test_sendmail.py to send a test email to kavya@inboxapp.com, kavya719@gmail.com
Note the test uses test account id = 1, so there's atleast one account stored in the db.