I am using sendGrid api to send mails. Below is the code
Request request = new Request() try { request.with { method = Method.POST