I have everything for my SES setup and all the requests are working. What I am trying to do now is send personalized bulk emails using replacementData. So, if there are two recepients jane@doe.com and johnny@doe.com I want to replace their respective names in the template. So that Jane gets an email saying "Hi Jane" and johnny gets: "Hi Johnny". I understand that I can do this using the JSON data but I am implementing it on NodeJS and would like to use the AWS SDK as much as possible. The code that I am currently using:
var params = {
BulkEmailEntries: [ /* required */ {
Destination: { /* required */
BccAddresses: [],
CcAddresses: [],
ToAddresses: ['jane@gmail.com', 'john@gmail.com']
},
ReplacementEmailContent: {
ReplacementTemplate: {
ReplacementTemplateData: `{"name":"Jane"},{"name":"John}`
}
},
ReplacementTags: [{
Name: 'Test',
/* required */
Value: 'test' /* required */
},
/* more items */
]
},
/* more items */
],
DefaultContent: { /* required */
Template: {
TemplateData: '{"name":"unknown"}',
TemplateName: 'testTemplate2'
}
},
DefaultEmailTags: [{
Name: 'test',
/* required */
Value: 'Test' /* required */
},
/* more items */
],
FromEmailAddress: 'info@xyz.com',
ReplyToAddresses: []
};
The email is sent but in both of them it say "Hi Jane". Please help