안녕하세요! 방금 Amazon SES를 시작했습니다. 내 asp.net mvc (C#) 웹 사이트에서 이것을 사용하고 싶습니다.ASP.NET MVC (C#)의 Amazon SNS를 통한 Amazon SES 피드백 알림 구성
Visual Studio 용 AWS Toolkit을 다운로드하여 설치하고 AWS 간단한 콘솔 응용 프로그램을 만듭니다. 그래서 AmazonSimpleEmailService 클라이언트를 사용하여 전자 메일을 보낼 수있는 샘플 코드가 있습니다.
PART 1 : 또한
using (AmazonSimpleEmailService client = AWSClientFactory.CreateAmazonSimpleEmailServiceClient(RegionEndpoint.USEast1))
{
var sendRequest = new SendEmailRequest
{
Source = senderAddress,
Destination = new Destination { ToAddresses = new List<string> { 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.");
}
, 나는 아마존 SNS를 통해 아마존 SES 피드백 알림을 구성해야합니다.
3 부 : 나는 샘플 코드 좋은 주제를 찾을 수 http://sesblog.amazon.com/post/TxJE1JNZ6T9JXK/Handling-Bounces-and-Complaints
그래서, 내가 할 필요를 내가 ReceiveMessageResponse 반응을 얻고 내가 구현할 필요 3.
PART로 보내드립니다 PART 2 C#에서이 단계 :
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.
내가 그것을 쓰기 시도 :
012,351 알림을 반송 처리하기 위해 다음과 같은 AWS 구성 요소를 설정// 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);
나는 올바른 방향에 있습니다.
어떻게 4 부분을 구현할 수 있습니까? XObject 수신 방법
감사합니다.
고맙습니다! 하지만 SQS없이 SNS 알림 수신을 구현합니다. 이것이 SQS 없이도 효과가 있기를 바랍니다. –
안녕하세요, [처리 반송 및 불만] (http://sesblog.amazon.com/post/TxJE1JNZ6T9JXK/Handling-Bounces-and-Complaints) SES 블로그 게시물을 작성했습니다. SQS 대신 HTTP/S 엔드 포인트를 사용하는 경우 반송 및 불만 처리가 정상적으로 작동합니다. 그러나 SNS는 인터넷 문제로 인해 HTTP/S 종단점 (http://aws.amazon.com/sns/faqs/#49)으로의 배송을 보장 할 수 없습니다. 샘플 코드에서 SQS를 사용한 이유는 SQS 전달에 대한 SNS가 훨씬 더 높은 안정성을 가지고 있었기 때문이며 바운스 및 불만 처리는 대개 중요한 작업으로 간주됩니다. –