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.