send_bounce
¶
send_bounce(
original_message_id: MessageId,
bounce_sender: Address,
bounced_recipient_info_list: BouncedRecipientInfoList,
*,
config_overrides: Optional[SESClientConfig] = None,
explanation: Optional[Explanation] = None,
message_dsn: Optional[MessageDsn] = None,
bounce_sender_arn: Optional[AmazonResourceName] = None,
) -> SendBounceResponse
Generates and sends a bounce message to the sender of an email you received through Amazon SES. You can only use this operation on an email up to 24 hours after you receive it.
You cannot use this operation to send generic bounces for mail that was not received by Amazon SES.
For information about receiving email through Amazon SES, see the Amazon SES Developer Guide.
You can execute this operation no more than once per second.
Parameters:
-
original_message_id(MessageId) –The message ID of the message to be bounced.
-
bounce_sender(Address) –The address to use in the "From" header of the bounce message. This must be an identity that you have verified with Amazon SES.
-
explanation(Optional[Explanation], default:None) –Human-readable text for the bounce message to explain the failure. If not specified, the text is auto-generated based on the bounced recipient information.
-
message_dsn(Optional[MessageDsn], default:None) –Message-related DSN fields. If not specified, Amazon SES chooses the values.
-
bounced_recipient_info_list(BouncedRecipientInfoList) –A list of recipients of the bounced message, including the information required to create the Delivery Status Notifications (DSNs) for the recipients. You must specify at least one
BouncedRecipientInfoin the list. -
bounce_sender_arn(Optional[AmazonResourceName], default:None) –This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the address in the "From" header of the bounce. For more information about sending authorization, see the Amazon SES Developer Guide.
Raises:
-
MessageRejected–Indicates that the action failed, and the message could not be sent. Check the error stack for more information about what caused the error.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ses/_services/ses.py
2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 | |