Note that I used SES for automation of email sending at work
You need to authenticate your email address The user you just created is in the SES sandbox, so both the source and destination need to be authenticated. If you move it out of the sandbox as described below, you will be able to send to destinations that have not been verified.
Send an authentication email to the email address used in Identity Management-> Email Addresses-> Verify New Email Address.
Click the link in the email and verify that the Status to the right of the email is verified.
Log in to the console and issue an SES transmission restriction release request from the support center. It will be canceled in 1 to 2 days.
Reference: http://docs.aws.amazon.com/ja_jp/ses/latest/DeveloperGuide/request-production-access.html
import boto3
client = boto3.client('ses', region_name='us-east-1')
response = client.send_email(
Source='[email protected]',
Destination={
'ToAddresses': ['[email protected]']
},
Message={
'Subject': {
'Data': 'hello',
},
'Body': {
'Text': {
'Data': 'hello ses.',
}
}
})
Recommended Posts