Tuesday, May 31, 2011

Script to populate mails to mail accounts with an attachment and contents in body.

Shell Script for populating mails to mail users - For testing reasons.

while read username
do
for i in {1..25}
do
mutt -s "sample mail $i" -a /root/attachment.log -- $username"@mltech.com" < mailbody.template
done
done < useraccount

useraccount file will contain mail accounts.
mailbody.template file will contain mail body content.
attachment.log file is the attachment file.

No comments: