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
demandé il y a 2 ans543 vues
1 réponse
0
Réponse acceptée

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

duplex
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions