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
asked 2 years ago590 views
1 Answer
0
Accepted Answer

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

duplex
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions