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.
If the value is true
, you receive email notifications when
bounce or complaint events occur. These notifications are sent to the
address that you specified in the Return-Path
header of the
original email.
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 (for example, by setting up an event destination), you receive 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
, you receive email notifications when
bounce or complaint events occur. These notifications are sent to the
address that you specified in the Return-Path
header of the
original email.
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 (for example, by setting up an event destination), you receive 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');
_s.validateStringLength(
'emailIdentity',
emailIdentity,
1,
1152921504606846976,
isRequired: true,
);
final $payload = <String, dynamic>{
if (emailForwardingEnabled != null)
'EmailForwardingEnabled': emailForwardingEnabled,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/v2/email/identities/${Uri.encodeComponent(emailIdentity)}/feedback',
exceptionFnMap: _exceptionFns,
);
}