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

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

问题描述

我从亚马逊服务器开始,并开始研究 SES.我正在使用 asp.net C# 并制作了基于代码的教程.我已经检查了域并检查了我将在其中运行测试的电子邮件.

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.

我的代码

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);
            }

        }

推荐答案

您的代码表明您正在尝试通过 us-west-2 发送.您是否申请了该地区的生产访问权限,并且您的 From 地址是否经过验证?Amazon SES 的生产访问与区域无关,您需要单独请求对于每个区域.

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.

如果您没有生产访问权限,您应该确保 FromTo 地址都经过验证.Amazon SES 控制台将列出您的经过验证的电子邮件地址验证域 us-west-2.Amazon SES 博客有关于如何设置的附加指南us-west-2 中.

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.

判断您是否没有生产访问权限的快速方法:登录Amazon SES 控制台仪表板,它将在页面顶部显示一个带有以下文本的蓝色横幅,并带有一个请求生产访问权限的按钮:

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:

您的 Amazon SES 账户在美国西部地区具有沙盒"访问权限(俄勒冈州).通过沙盒访问,您只能向亚马逊发送电子邮件SES 邮箱模拟器和您拥有的电子邮件地址或域验证.了解详情.

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.

找不到您现有的帐户设置?您的帐户可能已设置在不同的 AWS 区域.尝试在右上角切换区域控制台的一角.

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天全站免登陆