【发布时间】:2017-04-21 11:19:07
【问题描述】:
您好,我需要使用 PHP 中的 sendgrid v3 API 添加其他“cc”收件人。我该怎么做?
他们在文档中放了以下代码,但我觉得不够,因为我需要看看如何添加“抄送”收件人。
$request_body = json_decode('{
"personalizations": [
{
"to": [
{
"email": "test@example.com"
}
],
"subject": "Hello World from the SendGrid PHP Library!"
}
],
"from": {
"email": "test@example.com"
},
"content": [
{
"type": "text/plain",
"value": "Hello, Email!"
}
]
}'
);
【问题讨论】:
-
向下滚动以请求正文参数并阅读文档:sendgrid.com/docs/API_Reference/Web_API_v3/Mail/index.html