亚马逊SES的电子邮件地址未验证 [英] Amazon SES Email address is not verified

查看:5563
本文介绍了亚马逊SES的电子邮件地址未验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始与亚马逊的服务器和开始学习关于SES。
我使用asp.net C#,使我的code基础教程。
我已经检查了域名,并检查了,我将运行测试的电子邮件。

所以,当我跑我的code它会生成以下错误消息:交易失败。服务器响应为:邮件被拒绝:邮箱地址没有被证实。

我不知道它是什么,因为我也跟着一切可能的步骤,一个细节尚未下令获得生产的释放。

但我认为这是不可能的,我还在测试服务。

我的code

 公共无效enviarSES02()
        {
            尝试
            {
                常量字符串FROM =验证的电子邮件地址;
                常量字符串=经过验证的电子邮件地址;                常量字符串SUBJECT =亚马逊SES测试(使用C#SMTP接口访问);
                常量字符串BODY =这封电子邮件是通过亚马逊SES SMTP接口并使用C#发送。                常量字符串SMTP_USERNAME =我的用户名; //与您的SMTP用户名替换。
                常量字符串smtp_password参数=我的密码; //你的SMTP密码替换。                常量字符串HOST =email-smtp.us-west-2.amazonaws.com;                const int的PORT = 25; //已经尝试了所有端口推荐                SmtpClient客户端=新SmtpClient(主机,端口);
                client.Credentials =新System.Net.NetworkCredential(SMTP_USERNAME,smtp_password参数);                client.EnableSsl = TRUE;                尝试
                {
                    Console.WriteLine(试图通过亚马逊SES SMTP接口发送邮件...);
                    client.Send(发件人,收件人,主题,正文);
                    的Response.Write(ENVIADO);
                }
                赶上(异常前)
                {
                    的Response.Write(< BR>Ø电子邮件NAO FOI enviado< BR>中);
                    的Response.Write(奥良埃罗:+ ex.Message);
                }            }
            赶上(异常前)
            {
                的Response.Write(错误信息:+ ex.Message);
            }        }


解决方案

您code表示您正尝试通过来给我们东西-2 。您已要求在该地区生产准入,并为你的地址验证?亚马逊SES生产准入是区域无关,则需要请求它<一个href=\"http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html\">separately每个地区。

如果您不具备生产准入,就应该确保这两个地址验证。亚马逊SES控制台会列出您的验证的电子邮件地址验证域了解美西2 。亚马逊SES博客有额外指导你如何可以得到成立在美西2

一个快速的方法来告诉你,如果不具备生产准入:登录的亚马逊SES控制台,仪表盘,它会显示与在页面顶部以下文本蓝色旗帜的一个按钮,要求生产准入:


  

您亚马逊SES的帐户中区美西沙箱的访问
  (俄勒冈州)。随着沙箱访问你只能发送电子邮件至亚马逊
  SES邮箱模拟器和电子邮件,你有地址或域
  验证。了解详情。


  
  

找不到您现有的帐户设置?您的帐户可以设立
  在一个不同的AWS区域。尝试在右上角的切换区
  控制台的角落。


I'm starting with the amazon servers and started studying about SES. I am using asp.net C # and made ​​my code based tutorials. I already checked the domain and also checked the emails in which I will run the test.

So that when I run my code it generates the following error message: Transaction failed. The server response was: Message rejected: Email address is not verified.

I do not know what it is because I followed all possible steps, single detail is not yet ordered the release of access to production.

But I think it can not be, I'm still testing the service.

My Code

public void enviarSES02()
        {
            try
            {
                const String FROM = "verified email address"; 
                const String TO = "verified email address"; 

                const String SUBJECT = "Amazon SES test (SMTP interface accessed using C#)";
                const String BODY = "This email was sent through the Amazon SES SMTP interface by using C#.";

                const String SMTP_USERNAME = "my username";  // Replace with your SMTP username. 
                const String SMTP_PASSWORD = "my password";  // Replace with your SMTP password.

                const String HOST = "email-smtp.us-west-2.amazonaws.com";

                const int PORT = 25;//already tried with all recommended ports

                SmtpClient client = new SmtpClient(HOST, PORT);
                client.Credentials = new System.Net.NetworkCredential(SMTP_USERNAME, SMTP_PASSWORD);

                client.EnableSsl = true;

                try
                {
                    Console.WriteLine("Attempting to send an email through the Amazon SES SMTP interface...");
                    client.Send(FROM, TO, SUBJECT, BODY);
                    Response.Write("ENVIADO");
                }
                catch (Exception ex)
                {
                    Response.Write("<br>O e-mail não foi enviado.<br>");
                    Response.Write("Olhao erro: " + ex.Message);
                }

            }
            catch (Exception ex)
            {
                Response.Write("Error message: " + ex.Message);
            }

        }

解决方案

Your code indicates that you are trying to send via us-west-2. Have you requested production access in that region, and is your From address verified? Production access for Amazon SES is region-independent and you need to request it separately for each region.

If you do not have production access, you should make sure that both From and To addresses are verified. The Amazon SES console will list your verified email addresses and verified domains for us-west-2. The Amazon SES blog has additional guidance on how you can get set up in us-west-2.

A quick way to tell if you do not have production access: log in to the Amazon SES console dashboard and it will display a blue banner with the following text at the top of the page with a button to request production access:

Your Amazon SES account has "sandbox" access in region US West (Oregon). With sandbox access you can only send email to the Amazon SES mailbox simulator and to email addresses or domains that you have verified. Learn more.

Can't find your existing account settings? Your account may be set up in a different AWS region. Try switching regions in the upper right corner of the console.

这篇关于亚马逊SES的电子邮件地址未验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆