fixing a crash in send_emails when users turn email sending off