はじめに
シェルスクリプトを使用して、AWS SES でメールを送信する備呆録。
手順
#!/usr/bin/env bash
set -CEeuo pipefail
SES_FROM="[email protected]"
SES_TO="[email protected]"
SES_REGION="ap-northeast-1"
SES_SUBJECT="テストメール from SES"
SES_BODY="ほげほげ"
aws ses send-email \
--from "$SES_FROM" \
--destination "ToAddresses=$SES_TO" \
--message "Subject={Data=$SES_SUBJECT,Charset=utf-8},Body={Text={Data=$SES_BODY,Charset=utf-8}}" \
--region "$SES_REGION"
環境
% aws --version
aws-cli/2.27.26 Python/3.13.3 Darwin/24.3.0 source/arm64