mirror of
https://github.com/idanoo/SES-Email-Blaster
synced 2025-06-30 21:32:26 +00:00
Abstract tooling
This commit is contained in:
parent
d4fa33b233
commit
afe005d785
4 changed files with 23 additions and 5 deletions
8
README.md
Normal file
8
README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# SES-email-blast
|
||||
|
||||
Used to send bulk test emails for.. purposes
|
||||
|
||||
Usage:
|
||||
```
|
||||
$ bash send.sh <AWS Profile> <Num of msgs> <from email> <to email>
|
||||
```
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"ToAddresses": ["test@test.com"],
|
||||
"ToAddresses": ["REPLACE_WITH_SENDER"],
|
||||
"CcAddresses": [],
|
||||
"BccAddresses": []
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"Subject": {
|
||||
"Data": "Test email sent using the AWS CLI",
|
||||
"Data": "1 - Test email sent using the AWS CLI",
|
||||
"Charset": "UTF-8"
|
||||
},
|
||||
"Body": {
|
||||
|
|
16
send.sh
16
send.sh
|
@ -1,9 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
PROFILE=$1
|
||||
FROM=$2
|
||||
PROFILE=$1 # which AWS profile
|
||||
NUMBER=$2 # how many to send
|
||||
FROM=$3 # who we sending from
|
||||
TO=$4 # who we sending to
|
||||
|
||||
for i in {1..100}
|
||||
x=1
|
||||
sed -i "s/REPLACE_WITH_SENDER/$TO/g" destination.json
|
||||
echo "Sending $NUMBER messages to $TO from $FROM"
|
||||
for i in $(seq 1 $NUMBER)
|
||||
do
|
||||
sed -i "s/$x /$i /g" message.json
|
||||
x=$i
|
||||
aws ses --region us-west-2 --profile $PROFILE send-email --from $FROM --destination file://destination.json --message file://message.json
|
||||
done
|
||||
|
||||
sed -i "s/$TO/REPLACE_WITH_SENDER/g" destination.json
|
||||
sed -i "s/$x /1 /g" message.json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue