minor modification completed for email sending feature