send_email
The send_email
(or send_smtp_email
) function sends an e-mail message. You can use this function to alert people that events have taken place.
Syntax
send_email( params )
Arguments
Argument | Description |
---|---|
params
|
(table) Named parameters that configure the e-mail to be sent. The table maps parameter names (String) to parameter values. For information about the parameters that you can set, see the following table. For information about how to use named parameters refer to the Connector Framework Server Administration Guide. |
Named Parameters
Named Parameter | Description | Configuration Parameter |
---|---|---|
section
|
(string) The name of a section in the CFS configuration file. If you set this then any parameters not set in the parameters table are read from this section of the configuration file. | |
host
|
(string) The host name or IP address of the SMTP server to use to send the message. | SMTPServer |
port
|
(number) The port of the SMTP server. By default, the function uses port 25. | SMTPPort |
username
|
(string) The user name to use to authenticate with the SMTP server. NOTE: This parameter is not supported on FIPS platforms. |
SMTPUserName |
password
|
(string) The password to use to authenticate with the SMTP server. You can encrypt the password using the NOTE: This parameter is not supported on FIPS platforms. |
SMTPPassword |
from_host
|
(string) The host name from which the e-mail is being sent. This will form part of the metadata in the outgoing e-mail message, but is not required. | SMTPFromHost |
from
|
(string) The e-mail address that the message will appear to have been sent from. | SMTPFrom |
reply_to
|
(string) The reply-to address for the e-mail message. If you do not specify a value, the from address is used. |
SMTPReplyTo |
to
|
(table) An array of the e-mail addresses to which the e-mail is sent. | SMTPTo |
cc
|
(table) An array of the e-mail addresses to which a copy of the e-mail is sent. | SMTPCC |
bcc
|
(table) An array of the e-mail addresses to which a blind copy of the e-mail is sent. | SMTPBCC |
subject
|
(string) The subject of the e-mail message. | SMTPSubject |
content
|
(string) The content of the e-mail message. | SMTPContent |
attachments
|
(table) An array of the names of files to attach to the e-mail. | SMTPAttachments |
content_type
|
(string) The content type of the e-mail message ("text/plain" or "text/html" ). By default, the function uses "text/plain" . |
SMTPContentType |
Returns
If the e-mail is sent, the function returns true
. Otherwise, nothing is returned.