Hello,
I am trying to send transactional email using the golang SDK. Everything seems to work fine while generating the API requests, however some of the emails that are sent do not contain the parameters. Which emails are affected appears to be random.
For example if I send the following json document using the SendTransacEmail Endpoint:
{
"sender": {
"name": "Sender Person",
"email": "sender@domain.com"
},
"replyTo": {
"name": "Sender Person",
"email": "sender@domain.com"
},
"templateId": 2,
"messageVersions": [
{
"to": [
{
"email": "recipient@domain2.com",
"name": "Recipient Person"
}
],
"params": {
"ProductTable": "<table><thead><th>heading</th></thead><tbody><tr><td>content</td></tr></tbody></table>",
"ResponsibleEmail": "sender@domain.com",
"ResponsibleFunction": "IT-Department",
"ResponsibleName": "Sender Person",
"ResponsiblePhone": "137 293 999",
"Salutation": "Dear Mr. X"
},
"bcc": [
{
"email": "anotherperson@domain.com",
"name": "Another Person"
}
]
},
{
"to": [
{
"email": "recipient2@domain3.com",
"name": "Recipient2 Person"
}
],
"params": {
"ProductTable": "<table><thead><th>heading</th></thead><tbody><tr><td>more content</td></tr></tbody></table>",
"ResponsibleEmail": "sender@domain.com",
"ResponsibleFunction": "IT-Department",
"ResponsibleName": "Sender Person",
"ResponsiblePhone": "137 293 999",
"Salutation": "Dear Mrs. Y"
},
"bcc": [
{
"email": "anotherperson@domain.com",
"name": "Another Person"
}
]
}
]
}
Sometimes both emails will have the parameters populated correctly. But sometimes one email will not contain any of the parameters (just the « empty » template will be sent).
Whether a specific messageVersion is affected appears to be completely random. I have made sure that the json document I am sending to the API is correct (it does contain all the information and it is the same every time I send a request). However, when I send exactly the same request multiple times, the emails being sent by Brevo will be different (some containing all params, some not containing any).
I would be very glad if someone has any ideas what I could try to do.