added an email sender function