updating for sending emails