email functionality added