SendMail

SendMail

SendMail is a simple lightweight mail client. However it can be very useful when you need to send notifications in automatic mode. Why? Because SendMail accepts command line parameters that define message properties (such as recipient's address, subject, message, etc) and can be launched by other programs in response to some events. E.g. Built-in HostMonitor utility may start SendMail when monitored host does not respond. It allows you to send important notifications to network administrator or technician.

Configuring SendMail
First, select Options menu item and provide information about your mail server(s):

Primary SMTP Server

Backup SMTP server

If you chose to use backup SMTP server then same parameters (as listed above) will be required for it too. When SendMail tries to send e-mail, first it uses Primary SMTP server. If due to some error first attempt fails, SendMail tries to send e-mail through Backup SMTP server.

Some optional parameters:

Close on disconnect, delay closing for [N] sec
If you enable this option, SendMail will wait for a specified interval of time and then terminate itself after successful or unsuccessful attempt to send mail. Of course you may press the [Close] button to close utility immediately or the [Stop] button to stop countdown.

Show window in the last stored position
With this option enabled utility will "remember" its position on screen and restore back to those coordinates when you start SendMail again.



Using SendMail
Now you may easily send mail. You may prepare and send mail manually or same could be done automatically.


Manual mode:

Start SendMail utility and specify message parameters:

BTW: You may save preconfigured (or partly configured) mail template using menu "Mail"->"Save as default". Every time you start SendMail it will load stored template. Also you may open template at any time using menu "Mail"->Load default".

To send mail click "Send" button or use menu item "Mail"->"Send".


Automatic mode:

SendMail accepts command line parameters that define message properties (From, To, Subject, Text) and sends mail without human's interaction.

Format of the command line:
SendMail.exe [From=<address>] [To=<address>] [Subject=<SubjectText>] [Text=<FileName> | Body=<text>] [StartAfterLoad]
Where:
- From Specifies the email address of the sender.
- To Defines a list of recipients for the mail. A copy of the message is sent to each of them. For more than one destination, addresses should be separated by semicolon (;)
- Subject Specifies subject line of the mail message.
- Text Tells SendMail to read message's text from specified file (you should use either "Text" or "Body" parameter, but not both)
- Body Specifies message's text (you should use either "Text" or "Body" parameter, but not both)
- StartAfterLoad   Tells SendMail to connect to the mail server and send message right after startup. So, you don't need to click "Send" button.
You may omit some parameters. In this case SendMail will use parameters of the default mail template (see above).

Please remember:

  1. If some parameter contains spaces, conclude that parameter by single or double quotation marks. See Subject parameter in the example below.
  2. If you use SendMail in automatic mode, we recommend to enable "Close on disconnect, delay closing for [N] sec" option.
Example of the command:
SendMail.exe   From=iptools@firm.com   TO=admin@firm.com   "Subject=Host %HostName% is dead"   Text=d:\message.txt StartAfterLoad