Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29935

SES messages returns with status 200 but messages not arrive

$
0
0

I'm sending my self email with ses.send_email and getting 200 status but the messages not arriving to my email. any suggesting what i'm doing wrong?

import boto3
from botocore.config import Config as BotoCoreConfig

boto_config = BotoCoreConfig(region_name='us-east-1')
ses_client = boto3.client('ses', aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, config=boto_config)

def ses_report(message):
    response = ses_client.send_email(
        Source='a_valid_admin@mydomain.com',
        Destination={
            'ToAddresses': [
                'myemail@mydomain.com',
            ]
        },
        Message={
            'Subject': {
                'Data': message,
            },
            'Body': {
                'Text': {
                    'Data': message,
                },
                'Html': {
                    'Data': message,
                }
            }
        }
    )
    log.info(response)

ses_report('Test messages')

Getting this response:

{'ResponseMetadata': {'RetryAttempts': 0, 'HTTPStatusCode': 200, 'RequestId': '2f...', 'HTTPHeaders': {'x-amzn-requestid': '2f..', 'date': 'Sun, 05 Jan 2020 07:51:14 GMT', 'content-length': '326', 'content-type': 'text/xml'}}, u'MessageId': '010..00'}

Viewing all articles
Browse latest Browse all 29935

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>