Consolidates email sending into one function.