Skip to content

SendBulkEmail

Source: src/AWS/SES/SendBulkEmail.ts

Runtime binding for sesv2:SendBulkEmail.

Bind this operation to an EmailIdentity (and optionally a ConfigurationSet) inside a function runtime to get a callable that sends one templated message to up to 50 destinations per call, with per-entry replacement data. The binding grants the function the send actions scoped to the identity, the account’s templates, and the configuration set.

Bulk sends always render a template — reference one via DefaultContent.Template.

// init
const sendBulkEmail = yield* SES.SendBulkEmail(identity, configSet);
// runtime
const result = yield* sendBulkEmail({
DefaultContent: {
Template: {
TemplateName: "welcome-template",
TemplateData: JSON.stringify({ name: "friend" }),
},
},
BulkEmailEntries: [
{
Destination: { ToAddresses: ["ada@example.com"] },
ReplacementEmailContent: {
ReplacementTemplate: {
ReplacementTemplateData: JSON.stringify({ name: "Ada" }),
},
},
},
],
});
// result.BulkEmailEntryResults