overhaul of email sending