我在从 nirajp123@gmail.com 发送电子邮件时遇到以下错误。我已经验证了这封电子邮件。虽然代码和访问密钥相同,但我能够将电子邮件从其他电子邮件发送到相同的电子邮件。我没有得到任何可能发生的事情的线索。
我还可以通过 ses 控制台从 nirajp123@gmail.com
发送电子邮件[org.apache.http.wire] >> "Action=SendEmail&Version=2010-12-01&Source=nirajp123%40gmail.com&Destination.ToAddresses.member.1=waraichseerat%40gmail.com&Message.Subject.Data=asdasas&Message.Body.Html.Data=%3Cp%3EYour+content+here.dfsfdsf%3C%2Fp%3E%3Cimg+src%3D%27http%3A%2F%2Flocalhost%3A8080%2Flogo%3Faddressid%3D154%26emailid%3D14252%27%2F%3E"
[org.apache.http.wire] >> "POST / HTTP/1.1[r][n]"
[org.apache.http.wire] >> "Host: email.us-east-1.amazonaws.com[r][n]"
[org.apache.http.wire] >> "X-Amz-Date: Thu, 08 Jan 2015 15:34:40 GMT[r][n]"
[org.apache.http.wire] >> "X-Amzn-Authorization: AWS3 AWSAccessKeyId=AKIAJN7R2R3U7RUUVPPA,Algorithm=HmacSHA256,SignedHeaders=Host;X-Amz-Date,Signature=ujSfOjFvwgC/tRu6A16PrhtXSzfH/oS7aztaV+9p5jw=[r][n]"
[org.apache.http.wire] >> "User-Agent: aws-sdk-java/1.7.13 Linux/3.10.0-123.el7.x86_64 Java_HotSpot(TM)_64-Bit_Server_VM/25.5-b02/1.8.0_05[r][n]"
[org.apache.http.wire] >> "Date: Thu, 08 Jan 2015 15:34:40 GMT[r][n]"
[org.apache.http.wire] >> "Content-Type: application/x-www-form-urlencoded; charset=utf-8[r][n]"
[org.apache.http.wire] >> "Content-Length: 311[r][n]"
[org.apache.http.wire] >> "Connection: Keep-Alive[r][n]"
[org.apache.http.wire] >> "[r][n]"
[org.apache.http.headers] >> POST / HTTP/1.1
[org.apache.http.headers] >> Host: email.us-east-1.amazonaws.com
[org.apache.http.headers] >> X-Amz-Date: Thu, 08 Jan 2015 15:34:40 GMT
[org.apache.http.headers] >> X-Amzn-Authorization: AWS3 AWSAccessKeyId=AKIAJN7R2R3U7RUUVPPA,Algorithm=HmacSHA256,SignedHeaders=Host;X-Amz-Date,Signature=ujSfOjFvwgC/tRu6A16PrhtXSzfH/oS7aztaV+9p5jw=
[org.apache.http.headers] >> User-Agent: aws-sdk-java/1.7.13 Linux/3.10.0-123.el7.x86_64 Java_HotSpot(TM)_64-Bit_Server_VM/25.5-b02/1.8.0_05
[org.apache.http.headers] >> Date: Thu, 08 Jan 2015 15:34:40 GMT
[org.apache.http.headers] >> Content-Type: application/x-www-form-urlencoded; charset=utf-8
[org.apache.http.headers] >> Content-Length: 311
[org.apache.http.headers] >> Connection: Keep-Alive
[org.apache.http.wire] >> "Action=SendEmail&Version=2010-12-01&Source=nirajp123%40gmail.com&Destination.ToAddresses.member.1=nirajp123%40gmail.com&Message.Subject.Data=asdasas&Message.Body.Html.Data=%3Cp%3EYour+content+here.dfsfdsf%3C%2Fp%3E%3Cimg+src%3D%27http%3A%2F%2Flocalhost%3A8080%2Flogo%3Faddressid%3D153%26emailid%3D14251%27%2F%3E"
[org.apache.http.wire] << "HTTP/1.1 400 Bad Request[r][n]"
[org.apache.http.wire] << "x-amzn-RequestId: dc6deb22-974b-11e4-b425-2f4b2ec87708[r][n]"
[org.apache.http.wire] << "Content-Type: text/xml[r][n]"
[org.apache.http.wire] << "Content-Length: 276[r][n]"
[org.apache.http.wire] << "Date: Thu, 08 Jan 2015 15:34:40 GMT[r][n]"
[org.apache.http.wire] << "[r][n]"
[org.apache.http.impl.conn.DefaultClientConnection] Receiving response: HTTP/1.1 400 Bad Request
[org.apache.http.headers] << HTTP/1.1 400 Bad Request
[org.apache.http.headers] << x-amzn-RequestId: dc6deb22-974b-11e4-b425-2f4b2ec87708
[org.apache.http.headers] << Content-Type: text/xml
[org.apache.http.headers] << Content-Length: 276
[org.apache.http.headers] << Date: Thu, 08 Jan 2015 15:34:40 GMT
[com.amazonaws.http.impl.client.SdkHttpClient] Connection can be kept alive indefinitely
[org.apache.http.wire] << "<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">[n]"
[org.apache.http.wire] << " <Error>[n]"
[org.apache.http.wire] << " <Type>Sender</Type>[n]"
[org.apache.http.wire] << " <Code>MessageRejected</Code>[n]"
[org.apache.http.wire] << " <Message>Email address is not verified.</Message>[n]"
[org.apache.http.wire] << " </Error>[n]"
[org.apache.http.wire] << " <RequestId>dc6deb22-974b-11e4-b425-2f4b2ec87708</RequestId>[n]"
[org.apache.http.wire] << "</ErrorResponse>[n]"
我通过创建一个新用户并为其分配 SES 访问权限来解决问题。当我使用新用户的凭证时,我能够使用 Amazon API 发送电子邮件。