overhaul of email sending
Merge branch 'master' into pinauthintegration