add email functionality