(有关此问题的完整版本,请参阅 https://social.msdn.microsoft.com/Forums/en-US/20bb5b37-82af-4cf3-8a59-04e5f19572bc/send-email-to-multiple-recipients-使用-sendgrid-failure?forum=AzureFunctions )
发送给单个收件人成功。但无法在 Azure 功能中发送给多个收件人或抄送/密送。
尝试了几种格式,包括
{ "to": [{ "email": ["john.doe@example.com", "sendgridtesting@gmail.com" ] }] }
这似乎是天蓝色功能的极限。但还不确定哪里出了问题。请参阅下面的“绑定”,
{
"bindings": [
{
"name": "telemetryEvent",
"type": "serviceBusTrigger",
"direction": "in",
"queueName": "threshold-email-queue",
"connection": "RootManageSharedAccessKey_SERVICEBUS",
"accessRights": "Manage"
},
{
"type": "sendGrid",
"name": "$return",
"apiKey": "SendGridKey",
"direction": "out",
"from": "ABC@sample.com",
"to": [{
"email": ["test1@sample1.com", "test2@sample2.com" ]
}]
}
],
"disabled": false
}