email sending api that expects an email object as input