From d4fa33b233a63586b628e8c943874184c5de1dd8 Mon Sep 17 00:00:00 2001 From: idanoo Date: Fri, 11 Nov 2022 10:08:44 +1300 Subject: [PATCH] Add initial code --- destination.json | 5 +++++ message.json | 16 ++++++++++++++++ send.sh | 9 +++++++++ 3 files changed, 30 insertions(+) create mode 100644 destination.json create mode 100644 message.json create mode 100644 send.sh diff --git a/destination.json b/destination.json new file mode 100644 index 0000000..f6e3d9f --- /dev/null +++ b/destination.json @@ -0,0 +1,5 @@ +{ + "ToAddresses": ["test@test.com"], + "CcAddresses": [], + "BccAddresses": [] +} diff --git a/message.json b/message.json new file mode 100644 index 0000000..15423c6 --- /dev/null +++ b/message.json @@ -0,0 +1,16 @@ +{ + "Subject": { + "Data": "Test email sent using the AWS CLI", + "Charset": "UTF-8" + }, + "Body": { + "Text": { + "Data": "This is the message body in text format.", + "Charset": "UTF-8" + }, + "Html": { + "Data": "This message body contains HTML formatting. It can, for example, contain links like this one: Amazon SES Developer Guide.", + "Charset": "UTF-8" + } + } +} diff --git a/send.sh b/send.sh new file mode 100644 index 0000000..479bedb --- /dev/null +++ b/send.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +PROFILE=$1 +FROM=$2 + +for i in {1..100} +do + aws ses --region us-west-2 --profile $PROFILE send-email --from $FROM --destination file://destination.json --message file://message.json +done