使用邮递员在sendgrid v3正文中发送动态变量

问题描述 投票:1回答:1

我正在尝试使用邮递员使用v3 API通过Sendgrid发送电子邮件,我已经在3个不同的请求中创建了3个单独的变量,我想在一封邮件中传递所有这3个变量,为此我在sendgrid下使用了https://api.sendgrid.com/v3/mail/send与下面的身体

{
  "personalizations": [
    {
      "to": [
        {
          "email": "[email protected]",
          "name": "API Testing"
        }
      ],
      "subject": "API testing successful"
    }
  ],
  "from": {
    "email": "[email protected]",
    "name": "API Testing"
  },
  "content": [
    {
      "type": "text/plain",
      "value": "{{variable1}}"  //In variable1 has a dynamic values
    }
  ]
}

但是上述格式将邮件正文发送为{{Variable1}},有人可以帮我吗?

json postman sendgrid sendgrid-api-v3 postman-pre-request-script
1个回答
0
投票

根据我对问题的了解,您希望发送多个具有不同值的请求。

© www.soinside.com 2019 - 2024. All rights reserved.