sending mail from terminal after a script
I created a backup script which runs every morning on my iMac with OS 10.6.6. The script is launched successfully by Launchd from /Library/LaunchDaemons.
I would like to have the script send me an email once the backup job is done. I saw a few information about commands that can be added at the end of a script, like mail or mailx (for instance mail -s "Mysubject" myname@gmail.com or telnet smtp.gmail.com). I tried to run any of these lines from Terminal without success. I always get some kind of timeout of a sort.
I believe that I may have to configure my iMac in a way to be able to use these commands but I am not sure how and where to start.
Also, I am using Google Apps (on top of having also a Gmail.account). Not sure if I have to open some ports to make "mail" work.
Thanks for any kind of help or hints,
Lanceloz
iMac MBP, Mac OS X (10.6.6)