Mailer

Sends an email to a specified SNMP server. Useful for sending notifications. For an example see:

{installation directory}\Actions\VBScript\SendEmail.vbs

Methods

GetLastError(Description)

Description If an error happened in the mailer system, then the error can be retrieved by this method.
Arguments
[out] DescriptionReturns a text description of the error.
Return Value The system error number.

AddRecipient (EMail,Name)

Description Adds a recipient to the email. At least one recipient is required.
Arguments
[in] EMailThe email address of the recipient.
[in] NameThe name of the recipient.
Return Value A value of 1 indicates all went well. Any other value indicates an error.

AddBCCRecipient (EMail,Name)

Description Adds a Blind Carbon Copy Recipient to the email.
Arguments
[in] EMailThe email address of the recipient.
[in] NameThe name of the recipient.
Return Value A value of 1 indicates all went well. Any other value indicates an error.

AddCCRecipient (EMail,Name)

Description Adds a Carbon Copy Recipient to the email.
Arguments
[in] EMailThe email address of the recipient.
[in] NameThe name of the recipient.
Return Value A value of 1 indicates all went well. Any other value indicates an error.

ConnectServer (server,port)

Description Establishes a connection to the SNMP server.
Arguments
[in] ServerThe FQDN or IP Address of the SNMP relay server.
[in] PortThe tcp port used in the connection. Usually 25.
Return Value A value of 1 indicates all went well. Any other value indicates an error (GetLastError method may provide more info).

Disconnect ()

Description Terminates the connection with the SNMP server.
Arguments
NoneNone
Return Value A value of 1 indicates all went well. Any other value indicates an error (GetLastError method may provide more info).

GetConnectStatus ()

Description Queries if there is currently a connection to the SNMP server.
Arguments
None
Return Value Return value of 1 indicates that a connection exists, 0 indicates no connection exists.

Send()

Description Sends the email to the SNMP server. The connection must first be established with the ConnectServer () method.
Arguments
None
Return Value A value of 1 indicates all went well. Any other value indicates an error (GetLastError method may provide more info).

Properties

MessageBody

Description The contents of the messages.

Subject

Description The contents of the email's subject line.

SenderName

Description The name of the sender.

SenderEmail

Description The email address of the sender.

ReplyTo

Description The reply-to address of the email.

XMailer

Description Used to specify the X-Mailer header field. Sometimes used to define the system used to send the mail.

Copyright (c) Warren Flemmer 2006www.net-probe.com