Register
It is currently Wed Apr 23, 2014 11:35 am

Send a mail multiple times


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Sun Mar 09, 2008 5:45 am   

Joined: Sun Mar 09, 2008 5:26 am
Posts: 2
Code:
#!/bin/bash
times=5
for ((a=1; a <= times; a++))
do
mail -s "Message title $a" mail_address@example.com < mail.txt
done
exit 0


Where the mail.txt contains the body of the mail which you want to send.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP