[memo] Sending email on aws cli via SES

Posted: May 18, 2021

AWS_REGION='us-east-1'
TO='example@example.com'
FROM='example@example.com'
SUBJECT='This is test subject'
TEXT='text part of the email'
HTML="<h1>Hi</h1><p>HTML part of email</p><a href='https://www.google.com'>Link to Google</a>"
CONFIGRATION_SET='my-configuration-set'

aws --region "$AWS_REGION" ses send-email \
  --to "$TO" \
  --from "$FROM" \
  --subject "$SUBJECT" \
  --text "$TEXT" \
  --html "$HTML"
  --configuration-set-name "$CONFIGRATION_SET" \
  --tags "Name=tag1,Value=value1"