fixing email functionality to production