adding send-email functionality