Find out how to use sendmail (or other similar mail-serving software) to send e-mail from within your script.
More Tutorials