Added sendEmailFunction body