SES refuses to send email from own domain even though domain and email address are verified + no sandbox

0

Hi,

I have added my own domain (a namecheap domain) to AWS SES and created the CNAME records there about a week ago to use Easy DKIM. I added an email address within this domain, say test@example.com, example.com being the aforementioned domain. Both were successfully verified by AWS as it can be seen by the green checkmark: image

However, when I want to send an email from this domain via boto3, I get a MessageRejected error: "An error occurred (MessageRejected) when calling the SendEmail operation: Email address is not verified. The following identities failed the check in region my-region: correct-arn-of-identity."

The region is correct and my account is not in the sandbox anymore. It works to send from an existing email address, eg example@gmail.com.

How can I send emails from my own domain?

Edit as requested, here is the relevant code: ses_client = boto3.client("ses")

response = ses_client.send_email(
    Source=source_email_address,
    Destination={
        "ToAddresses": [
            destination_email_address,
        ],
    },
    Message={
        "Subject": {"Data": subject, "Charset": "utf-8"},
        "Body": {
            "Text": {"Data": email_txt, "Charset": "utf-8"},
        },
    },
    SourceArn=f"arn:aws:ses:MyRegion:MyAWSAccount:identity/{source_email_address}",
    ReturnPathArn=f"arn:aws:ses:MyRegion:MyAWSAccount:identity/{source_email_address}",
)
  • Can you share the code because the code implemented in boto3 may be incorrect?

  • I added some code. Please note that it works to send from an existing email address, eg example@gmail.com.

duplex
已提問 2 年前檢視次數 543 次
1 個回答
0
已接受的答案

It works if you use the domain identity's arn instead of the email identity's arn.

duplex
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南