Previous Topic: checkfile Utility--Display the File Size

Next Topic: getver Utility--Display File Information (Windows Only)

email Utility--Send an Email

The email utility sends an email. Use this utility as an action to send an email based on agent monitoring. The utility works in both IPV4 and IPv6 environments.

This utility has the following format:

email
    [-v]
    [-s]
    [-a]
    [-r smtp-server]
    [-xhdrf filename ]
    source-addr
    dest-addr
    [subject]
    [message]
-v

Enables verbose mode, and prints useful information to the screen.

-s

Lets you add more text to the message body by typing it on the terminal (stdin). Use ^D (CTRL+D) on UNIX to finish the message and ^Z (CTRL+Z) on Windows.

Note: You still must specify subject or message arguments when this option is specified.

-a

Removes the requirement to specify a subject or a message body. This option is most useful when used with a SystemEDGE action.

-r smtp_server

Lets you specify the mail server name to use when sending the email. By default, the program looks up the MX record of the host in the 'To' address, and tries to send the email that way. However, if the program cannot connect to the destination mail exchanger (due to a firewall), you can send the message through the local mail server, specified by the -r option.

-xhdrf filename

Adds user defined information from a file to the email header. You can use this option to specify ISO character set information.

source-addr

Specifies the source email address in the format user@domain.

dest-addr

Specifies the destination email address in the format user@domain.

subject

Specifies the subject text of the email. Enclose the subject text in single quotes if the text contains more than one word.

message

Specifies the message body of the email. Enclose the message text in single quotes if the text contains more than one word.

Examples

email -r mail.foo.com  source@foo.com dest@foo.com 'email subject' 'email message'
email -v -r mail.foo.com  source@foo.com dest@foo.com 'email subject' 'email message'
email -v -s -r mail.foo.com  source@foo.com dest@foo.com 'email subject' 'email message'