putEmailIdentityFeedbackAttributes method
Used to enable or disable feedback forwarding for an identity. This setting determines what happens when an identity is used to send an email that results in a bounce or complaint event.
When you enable feedback forwarding, Amazon Pinpoint sends you email notifications when bounce or complaint events occur. Amazon Pinpoint sends this notification to the address that you specified in the Return-Path header of the original email.
When you disable feedback forwarding, Amazon Pinpoint sends notifications through other mechanisms, such as by notifying an Amazon SNS topic. You're required to have a method of tracking bounces and complaints. If you haven't set up another mechanism for receiving bounce or complaint notifications, Amazon Pinpoint sends an email notification when these events occur (even if this setting is disabled).
May throw NotFoundException. May throw TooManyRequestsException. May throw BadRequestException.
Parameter emailIdentity
:
The email identity that you want to configure bounce and complaint
feedback forwarding for.
Parameter emailForwardingEnabled
:
Sets the feedback forwarding configuration for the identity.
If the value is true
, Amazon Pinpoint sends you email
notifications when bounce or complaint events occur. Amazon Pinpoint sends
this notification to the address that you specified in the Return-Path
header of the original email.
When you set this value to false
, Amazon Pinpoint sends
notifications through other mechanisms, such as by notifying an Amazon SNS
topic or another event destination. You're required to have a method of
tracking bounces and complaints. If you haven't set up another mechanism
for receiving bounce or complaint notifications, Amazon Pinpoint sends an
email notification when these events occur (even if this setting is
disabled).
Implementation
Future<void> putEmailIdentityFeedbackAttributes({
required String emailIdentity,
bool? emailForwardingEnabled,
}) async {
ArgumentError.checkNotNull(emailIdentity, 'emailIdentity');
final $payload = <String, dynamic>{
if (emailForwardingEnabled != null)
'EmailForwardingEnabled': emailForwardingEnabled,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/v1/email/identities/${Uri.encodeComponent(emailIdentity)}/feedback',
exceptionFnMap: _exceptionFns,
);
}