Created
November 10, 2018 13:24
-
-
Save jthop/fd3b418f7910d469384a774c76b34f39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Send email via ses using boto3 | |
import boto3 | |
REGION = 'us-east-1' | |
TO = ['test@test.com'] | |
TEXT_BODY = 'testing 1 2 3' | |
HTML_BODY = 'html body' | |
SUBJECT = 'boto' | |
client = boto3.client('ses', region_name=REGION) | |
response = client.send_email( | |
Destination={'ToAddresses': TO}, | |
Message={ | |
'Body': { | |
'Text': {'Data': TEXT_BODY}, | |
'Html': {'Data': HTML_BODY} | |
}, | |
'Subject': {'Data': SUBJECT}, | |
}, | |
Source='Mode14 <no-reply@mode14.com>', | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment