I'm using alexkowalski script from Email using shell script
MAILADDR=(mail1@example.com, mail2@example.com, mail3@example.com)
for i in "${MAILADDR[@]}"
do
echo "Mail test..." | mail -s "Mail test subject..." $i
done
My question is how to read MAILADDR
array from an external flat file?
And how to insert an external flat file replacing the body of the email as in
echo"/home/user/information-for-any-user.txt" | mail -s "Mail test subject..." $i ??
Aucun commentaire:
Enregistrer un commentaire