sendGrid set headers/content type

一曲冷凌霜 提交于 2020-01-04 17:53:35

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!