set_identity_notification_topic ( $identity, $notification_type, $opt )

Given an identity (email address or domain), sets the Amazon SNS topic to which Amazon SES will publish bounce and complaint notifications for emails sent with that identity as the Source. Publishing to topics may only be disabled when feedback forwarding is enabled. For more information about feedback notification, see the Amazon SES Developer Guide.

Access

public

Parameters

Parameter

Type

Required

Description

$identity

string

Required

The identity for which the topic will be set. Examples: user@example.com, example.com.

$notification_type

string

Required

The type of feedback notifications that will be published to the specified topic. [Allowed values: Bounce, Complaint]

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • SnsTopic - string - Optional - The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon SNS) topic. If the parameter is ommited from the request or a null value is passed, the topic is cleared and publishing is disabled.
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Testing Feedback Notification feature of SES

// Instantiate the class
$email = new AmazonSES();

$response = $email->set_identity_feedback_forwarding_enabled('you@example.com', true);

var_dump($response->isOK());

$response = $email->set_identity_notification_topic('you@example.com', 'Bounce');

var_dump($response->isOK());

$response = $email->get_identity_notification_attributes('you@example.com');

var_dump($response->isOK());
Result:
bool(true)
bool(true)
bool(true)

Source

Method defined in services/ses.class.php | Toggle source view (8 lines) | View on GitHub

public function set_identity_notification_topic($identity, $notification_type, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['Identity'] = $identity;
    $opt['NotificationType'] = $notification_type;
    
    return $this->authenticate('SetIdentityNotificationTopic', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback