API to send an email