1 回答
- 最新
- 投票最多
- 评论最多
0
Hi
Issues:
- SMTP credentials generated in IAM are for Amazon Simple Email Service (SES). Make sure your SES account is out of the sandbox environment and has production access. Check your sending limits and reputation. https://docs.aws.amazon.com/ses/latest/dg/request-production-access.html
- Verify that the IAM user (whose credentials you're using) has the necessary permissions to send emails via SES
- Network telnet email-smtp.ap-southeast-2.amazonaws.com 587 to see you are able to connect on this port
- [https://docs.aws.amazon.com/ses/latest/dg/smtp-credentials.html#smtp-credentials-convert](Obtaining SES SMTP credentials by converting existing AWS credentials)
Important Don't use temporary AWS credentials to derive SMTP credentials. The SES SMTP interface doesn't support SMTP credentials that have been generated from temporary security credentials.
The following pseudocode shows the algorithm that converts an AWS secret access key to an SES SMTP password.
// Modify this variable to include your AWS secret access key
key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY";
// Modify this variable to refer to the AWS Region that you want to use to send email.
region = "us-west-2";
// The values of the following variables should always stay the same.
date = "11111111";
service = "ses";
terminal = "aws4_request";
message = "SendRawEmail";
version = 0x04;
kDate = HmacSha256(date, "AWS4" + key);
kRegion = HmacSha256(region, kDate);
kService = HmacSha256(service, kRegion);
kTerminal = HmacSha256(terminal, kService);
kMessage = HmacSha256(message, kTerminal);
signatureAndVersion = Concatenate(version, kMessage);
smtpPassword = Base64(signatureAndVersion);
Addition Information: [https://docs.aws.amazon.com/ses/latest/dg/monitor-sender-reputation.html](Monitoring your Amazon SES sender reputation)
相关内容
- AWS 官方已更新 1 年前
Thank you GK. For the code, what programming language should I use to get the AWS secret access key?