问题
I'm looking to use sendGrid to create an outlook meeting request.
I need to be able to set the content type (header) to something specific, however does anyone know how I can do this? I presume I am to use the x-smtpapi, whilst accepting a json string.
Here is what I currently have.
$json_string = array(
'Content-Type' => array(
'text/calendar; Content-Disposition: inline; charset=utf-8;\r\n',
'text/plain;charset=\"utf-8\"\r\n'
));
Many thanks
回答1:
Unfortunately, using SendGrid Web API there is no way to change the content type yet.
In Web API, there's no way to force the content-type. In SMTP however, we'll respect whatever you set it to.
Reference: this SendGrid support engineer answer
Edit:
The answer is 2 years old. You may have better luck asking again on https://community.sendgrid.com/sendgrid
来源:https://stackoverflow.com/questions/28723653/sendgrid-set-headers-content-type