REST interface to email system