MBF Knowledge Base

How to send mail to all users in Imail

Mailall.exe is a command line utility that sends mail to all users on a particular host or on all hosts on the IMail system.


Basic Command Syntax

mailall -h hostname|ALL> -f sender -d [-s Subject] <FullPathToMessageFile>

Examples:

mailall -h myhost -f admin@myhost -s "Admin note" C:\mailnotes.txt

The above example sends the file mailnotes.txt to all users on myhost. The message is from admin@myhost; the Subject is Admin Note.

Alias1=|mailall -h myname -d

The preceding example creates a program alias that is used to send mail to all users on the myname host. Then, you can send a message to Alias1@myname.com, and it will go to everyone on the myname host.


Commands and Functions

-h hostname - The -h  parameter is required. Use it to enter the hostname.

-h ALL - The -h parameter is required. Use this command to specify all hosts on the IMail system.

-f sender - Specifies what address appears in the From field. A value is required if you are using a text file that has no From header line.

-s subject - This is an optional parameter that specifies the content of the Subject field.

-d Optional. Use -d to delete the source files when mailing is complete.

FullPathToMessageFile - This parameter is required.