cfmail

Overview ColdFusion Open BlueDragon Lucee

Sends an e-mail message that optionally contains query output, using an SMTP server.

Attributes

Name Required Type Default Description
4
async No if set to true, the mail is sent asynchronously by the Railo Task manager (with multiple tries), if set to false the mail is sent in the same thread that executes the request, which is useful for troubleshooting because you get an error message if there is one. This setting overrides the setting with the same name in the Railo Administrator. This attribute replaces the old "spoolenable" attribute which is still supported as an alias.
bcc No String Address(es) to which to copy the message, without listing them in the message header.
callback No The name of the CFC that will have onMailSuccess/onMailFail callbacks
callbackdata No A string that will be passed on through to the callback functions; can be any string
cc No String Address(es) to which to copy the message
charset No String The character encoding in which the part text is encoded. For more information on character encodings, see: www.w3.org/International/O-charset.html.
debug No Boolean false * Yes: sends debugging output to standard output. By default, if the console window is unavailable, ColdFusion sends output to cf_root\runtime\logs\coldfusion-out.log on server configurations. On J2EE configurations, with JRun, the default location is jrun_home/logs/servername-out.log. * No: does not generate debugging output.
11
encrypt No Boolean false If email should be encrypted or not.
11
encryptionAlgorithm No String Encryption algorithm to use.
failto No String Address to which mailing systems should send delivery failure notifications. Sets the mail envelope reverse-path value.
from Yes String E-mail message sender:
group No String Query column to use when you group sets of records to send as a message. For example, to send a set of billing statements to a customer, group on "Customer_ID." Case-sensitive. Eliminates adjacent duplicates when data is sorted by the specified field.
groupcasesensitive No Boolean Whether to consider case when using the group attribute. To group on case-sensitive records, set this attribute to Yes.
9
keyalias No String Alias of the key with which the certificate and private key is stored in keystore. If it is not specified then the first entry in the keystore will be picked up.
9
keypassword No String Password with which the private key is stored. If it is not specified, keystorepassword will be used as keypassword as well.
9
keystore No String Keystore containing the private key and certificate. The supported type is JKS (java key store) and pkcs12
9
keystorepassword No String Password of the keystore
mailerid No String Mailer ID to be passed in X-Mailer SMTP header, which identifies the mailer application.
maxrows No Numeric Maximum number of messages to send when looping over a query.
mimeattach No String Path of file to attach to message. Attached file is MIME-encoded. CFML attempts to determine the MIME type of the file; use the cfmailparam tag to send an attachement and specify the MIME type.
password No String A password to send to SMTP servers that require authentication. Requires a username attribute.
port No Numeric TCP/IP port on which SMTP server listens for requests (normally 25). A value here overrides the Administrator.
8
3
priority No String normal The message priority level. Can be one of the following values: * An integer in the range 1-5; 1 represents the highest priority. * One of the following string values, which correspond to the numeric values: highest or urgent, high, normal, low, and lowest or non-urgent.
proxypassword No When required by a proxy server, a valid password.
proxyport No The port number on the proxy server from which the object is requested. Default is 80. When used with resolveURL, the URLs of retrieved documents that specify a port number are automatically resolved to preserve links in the retrieved document.
proxyserver No Host name or IP address of a proxy server.
proxyuser No When required by a proxy server, a valid username.
query No Query Name of cfquery from which to draw data for message(s). Use this attribute to send more than one message, or to send query results within a message.
11
recipientCert No String Path to public key certificate of recipient.
9
3
remove No Boolean Tells ColdFusion to remove any attachments after successful mail delivery.
replyto No String Address(es) to which the recipient is directed to send replies.
3
secure No alias for ssl
server No String SMTP server address, or (Enterprise edition only) a comma-delimited list of server addresses, to use for sending messages. At least one server must be specified here or in the CFML MX Administrator. A value here overrides the Administrator. A value that includes a port specification overrides the port attribute. See the Usage section for details.
9
sign No Boolean Mail will be signed when set to true
spoolenable No Boolean Specifies whether to spool mail or always send it Immediately. Overrides the CFML MX Administrator Spool mail messages to disk for delivery setting.
3
ssl No
startrow No Numeric 1 Row in a query to start from.
3
starttls No alias for tls
subject Yes String Message subject. Can be dynamically generated.
timeout No Numeric Number of seconds to wait before timing out connection to SMTP server. A value here overrides the Administrator.
3
tls No
to Yes String Message recipient e-mail addresses.
type No String text/plain The MIME media type of the part. Can be a can be valid MIME media type
username No String A user name to send to SMTP servers that require authentication. Requires a password attribute
8
3
usessl No Boolean Whether to use Secure Sockets Layer.
8
3
usetls No Boolean Whether to use Transport Level Security.
wraptext No Numeric Specifies the maximum line length, in characters of the mail text. If a line has more than the specified number of characters, replaces the last white space character, such as a tab or space, preceding the specified position with a line break. If there are no white space characters, inserts a line break at the specified position. A common value for this attribute is 72.