Translate smtp protocol to sendgrid restful api