email


email (SmtpHost, SmtpPort, SmtpEncrypt, SmtpUsername, SmtpPassword, MailTo, MailFrom, Subject, Body)

Creates and sends an e-mail message according to the parameters.

Parameters:

SmtpHost

The smtp (mail server) host name or IP address.

SmtpPort

The smtp port (usually 25).

SmtpEncrypt

Set to false, TLS, or SSL. When set to:

  • falseno encryption is done
  • TLS, the "starttls" command is sent to the e-mail server to start the encryption.
  • SSL, the connection is started using SSL/TLS.

You may need to consult your e-mail administrator to determine which encryption flag should be used.

SmtpUsername

The user name for the smtp account.

SmtpPassword

The password for the smtp account.

MailTo

A comma-separated list of e-mail recipients.

MailFrom

The user name from which the e-mail is to be sent.

Subject

The subject of the e-mail.

Body

The text of the e-mail.

Returns:

This function does not return a value.

Example:

function mailMe()

host = "mail.bmc.com"

port = "25"

encrypt = "false"

user = ""

pass = ""

toAddr = "user@bmc.com"

fromAddr = "root@mvcmdemo.bmc.com"

subject = "Test"

body = "Hello"

email(host, port, encrypt, user, pass, toAddr, fromAddr, subject, body)

return 0


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Ops Console Management, BMC AMI Ops Console Automation, and BMC AMI Ops SecureHMC 4.1