added snippet for sending email