Command line SMTP mailer is a common tool for batch jobs and tasks automation.
BMail is a small command line application allowing to send emails directly from command line.
The utility has simple command line parameters:
Command Line SMTP Emailer V1.07
Copyright(C) 2002-2004 Craig.Peacock@beyondlogic.org
Date: Tue, 10 Oct 2006 15:09:07 +0200
Usage: bmail [options]
-s SMTP Server Name
-p SMTP Port Number (optional, defaults to 25)
-t To: Address
-f From: Address
-b Text Body of Message (optional)
-h Generate Headers
-a Subject (optional)
-m Filename (optional) Use file as Body of Message
-c Prefix above file with CR/LF to separate body from header
-d Debug (Show all mail server communications)
So lets say after your script completes you need to send an email that the script has been executed you can use this simple command:
bmail -s 192.168.1.1 -t yourem@ail -b -h -a “Script Complete” -b “You are good script developer. Your script worked!”
Bmail is available free of charge. You can download bmail from here. After your download completes you need to extract bmail executable from archive and place it in any convenient location. Bmail does not require any additional software installed on your PC.