Added support for sending emails