我正在尝试通过以下方式从Acumatica RestAPI发送邮件API网址:
https:/{url}/entity/Default/17.200.001/Email?CompanyID=STS&ScreenID=CR306015
使用此处显示的请求调用此API时遇到问题:
{
"From":
{
"value":"[email protected]"
},
"To":
{
"value":"[email protected]"
},
"Subject":
{
"value":"Test Email"
},
"Body":
{
"value":"Sample Erp Bot Mail Check"
}
}
是将邮件保存到草稿中,而不是保存到已发送(未发送到收据)。
调用RestAPI时得到的响应是:
(邮递员回复:200 OK)
"MailStatus": {
"value": "Draft"
}
[请提出一种使用C#和.NET通过Acumatica [RestAPI]发送电子邮件的方法。
为此,您实际上需要执行2个API调用:
要执行发送动作,您需要执行以下请求:
POST: https://{url}/entity/Default/17.200.001/Email/SendEmail
Body:
{
"entity":
{
"id": "put yor email ID here that you get as a result of email creation"
}
}