Skip to content

SendBounce

Source: src/AWS/SES/SendBounce.ts

Runtime binding for ses:SendBounce (classic SES).

Generates and sends a bounce message to the sender of an email you received through SES receiving — the data-plane counterpart to SES.ReceiptRule inbound processing. You can only bounce a message within 24 hours of receiving it, and only for mail SES actually received.

Account-level operation with no resource-level IAM scoping. Provide the implementation with Effect.provide(AWS.SES.SendBounceHttp).

// init — account-level binding, no resource argument
const sendBounce = yield* SES.SendBounce();
// runtime — inside the Lambda that a ReceiptRule invokes
yield* sendBounce({
OriginalMessageId: messageId,
BounceSender: "mailer-daemon@example.com",
BouncedRecipientInfoList: [
{
Recipient: "nobody@example.com",
BounceType: "DoesNotExist",
},
],
});