title: Configuring Amazon SES Feedback Notifications via Amazon SNS in ASP.NET MVC (C#)
body: <p>Good day!
  I'm just started with Amazon SES.
  I want use this in my asp.net mvc (C#) website.</p>
  
  <p>I download and install AWS Toolkit for Visual Studio, create AWS simple console application.
  So, I have sample code that can send email, using AmazonSimpleEmailService client.</p>
  
  <p>PART 1:</p>
  
  <pre><code>using (AmazonSimpleEmailService client = AWSClientFactory.CreateAmazonSimpleEmailServiceClient(RegionEndpoint.USEast1))
  {
       var sendRequest = new SendEmailRequest
       {
       Source = senderAddress,
       Destination = new Destination { ToAddresses = new List&lt;string&gt; { receiverAddress } },
       Message = new Message
       {
          Subject = new Content("Sample Mail using SES"),
          Body = new Body { Text = new Content("Sample message content.") }
       }
       };
  
       Console.WriteLine("Sending email using AWS SES...");
       SendEmailResponse response = client.SendEmail(sendRequest);
       Console.WriteLine("The email was sent successfully.");
   }
  </code></pre>
  
  <p>Further, I must configuring Amazon SES Feedback Notifications via Amazon SNS.
  I find nice topic with sample code:</p>
  
  <p>PART 3:
  <a href="http://sesblog.amazon.com/post/TxJE1JNZ6T9JXK/Handling-Bounces-and-Complaints" rel="nofollow">http://sesblog.amazon.com/post/TxJE1JNZ6T9JXK/Handling-Bounces-and-Complaints</a></p>
  
  <p>So, I need make PART 2 where I'll get ReceiveMessageResponse response and send it into PART 3.</p>
  
  <p>I need implement in C# this steps:
   Set up the following AWS components to handle bounce notifications:</p>
  
  <pre><code>1. Create an Amazon SQS queue named ses-bounces-queue.
  2. Create an Amazon SNS topic named ses-bounces-topic.
  3. Configure the Amazon SNS topic to publish to the SQS queue.
  4. Configure Amazon SES to publish bounce notifications using ses-bounces-topic to ses-bounces-queue.
  </code></pre>
  
  <p>I try write it:</p>
  
  <pre><code>// 1. Create an Amazon SQS queue named ses-bounces-queue.
   AmazonSQS sqs = AWSClientFactory.CreateAmazonSQSClient(RegionEndpoint.USWest2);
                      CreateQueueRequest sqsRequest = new CreateQueueRequest();
                      sqsRequest.QueueName = "ses-bounces-queue";
                      CreateQueueResponse createQueueResponse = sqs.CreateQueue(sqsRequest);
                      String myQueueUrl;
                      myQueueUrl = createQueueResponse.CreateQueueResult.QueueUrl;
  // 2. Create an Amazon SNS topic named ses-bounces-topic
  AmazonSimpleNotificationService sns = new AmazonSimpleNotificationServiceClient(RegionEndpoint.USWest2);
                      string topicArn = sns.CreateTopic(new CreateTopicRequest
                      {
                          Name = "ses-bounces-topic"
                      }).CreateTopicResult.TopicArn;
  // 3. Configure the Amazon SNS topic to publish to the SQS queue
                      sns.Subscribe(new SubscribeRequest
                      {
                          TopicArn = topicArn,
                          Protocol = "https",
                          Endpoint = "ses-bounces-queue"
                      });
  // 4. Configure Amazon SES to publish bounce notifications using ses-bounces-topic to ses-bounces-queue
                      clientSES.SetIdentityNotificationTopic(XObject);
  </code></pre>
  
  <p>I'm on the right track?</p>
  
  <p>How I can implement 4 part? How receive XObject?</p>
  
  <p>Thanks!</p>