This script uses the Unix mailx program to send a pre-scripted email to someone. It will take in an email address on the command line as an argument and send the mail to this address. Just copy and paste this into a file named mailerscript and change the file permissions to 755 and then your on your way! You can see how to change the permissions here if your unsure.
In order to run the script just use the command
$ ./mailerscript user@example.com
where user@example.com is the email address you wish the mail to go to.
#!/bin/sh # Usage: mailerscript <email address> if [ $1 ]; then FILE=/tmp/mailerscript-$UID.txt echo "Emailing $1..."; echo " Hi, This script will send an email to someone taking in a single argument. You can take in as many as you want though. Killian " >$FILE mail -s "Scripted mail sent" $1 -c user@example.com < $FILE rm $FILE else echo "Usage: mailerscript <email address>" fi