【发布时间】:2021-06-14 08:28:30
【问题描述】:
我正在尝试使用 Mandrill 通过调整来自 https://mailchimp.com/developer/transactional/api/messages/send-new-message/ 的 curl 命令并使用来自 https://us1.admin.mailchimp.com/account/api/ 的 API 密钥发送一封电子邮件,但我收到了一个对我来说没有多大意义的错误.这是我正在运行的命令:
curl -X POST \
https://mandrillapp.com/api/1.0/messages/send \
-d '{"key":"...","message":{"html":"hello, world!","subject":"hello, world!","from_email":"neubert@neubert.com","to":["neubert@neubert.com"]}}'
回复如下:
{"status":"error","code":-2,"name":"ValidationError","message":"Validation error: {\"message\":{\"to\":[\"Please enter an array\"]}}"}
在这里解码:
{
"status": "error",
"code": -2,
"name": "ValidationError",
"message": "Validation error: {\"message\":{\"to\":[\"Please enter an array\"]}}"
}
我不明白。 "to" 是一个数组...
有什么想法吗?
谢谢!
【问题讨论】:
标签: mailchimp mandrill mailchimp-api-v3.0