email sending fixes