send_bounce
async
¶
send_bounce(
original_message_id: MessageId,
bounce_sender: Address,
bounced_recipient_info_list: BouncedRecipientInfoList,
*,
config_overrides: Optional[AsyncSESClientConfig] = 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/async_ses.py
2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 | |