modified to use request context when sending email