Fixes to emailing.