Finalized as of 2019-08-11T15:30:45 -04:00 (EDT)
This commit is contained in:
19
email_recipients.sh
Executable file
19
email_recipients.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
[[ -z "${@}" ]] && >&2 echo "Must supply email address list!" && exit 1
|
||||
|
||||
date=$(date -d '-1 day' +%F)
|
||||
while [[ ! -z "${@}" ]]; do
|
||||
addr=${1}
|
||||
shift
|
||||
|
||||
mail -r acf.shiptracker@gmail.com \
|
||||
-s "ACF ShipTracker Log" \
|
||||
-a /var/log/acfst/ACFshipdata_${date}.csv \
|
||||
${addr} << EOF
|
||||
This is an automated ACF ShipTracker email. Attached is the log from yesterday (${date}). It contains all of the vessels coming through Mobile Bay that meet the thresholds (currently traveling over 10.0 knots and at least 15.0 meters wide). The format of the file is Comma Separated Values (CSV).
|
||||
|
||||
Please do not respond to this email. For assistance, please contact Justin Blancher (jeblancher@gmail.com) for any troubleshooting.
|
||||
|
||||
EOF
|
||||
done
|
||||
Reference in New Issue
Block a user