MACROMEDIA COLFUSION MX 7-CFML Reference page 298

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

Note: The
cfmail
tag to send a message with an attachment with spooling enabled and you use the
cfmail
to delete the attachment file, ColdFusion might not send the mail because the mailing process might
execute after the file was is deleted. (When this happens, the mail log includes a FileNotFound
exception and the e-mail is not sent.) You can prevent this problem by setting
the attribute or disabling spooling in the ColdFusion MX Administrator. Disabling spooling causes the
e-mail to be delivered immediately.
Mail addressing
Mail addresses can have any of the following forms:
Format
user@server
<user@server>
DisplayName <user@server>
"DisplayName" <user@server>
user@server (DisplayName)
Specifying mail servers
The
attribute can specify one or more mail servers.
server
Note: If you specify multiple mail servers in ColdFusion MX Standard, the cfmail tag uses only the
first server in the specification. ColdFusion logs a warning message to the mail log file and ignores the
additional servers.
For each server, you can optionally specify a username, password, and port. These values override
the corresponding attributes, if any. The
[user:password@]server[:port],[user:password@]server[:port],....
For example, the following line specifies one server, mail.myco.com that uses the default port and
no user or password, and a second server with a user, password, and specific port:
server=mail.myco.com,mail_admin:adm2qzf@mail2.myco.com:24
When you specify multiple mail servers in ColdFusion Enterprise, ColdFusion tries the available
servers in the order they are listed until it connects to a server. ColdFusion does not try to connect
to a server that was unavailable in the last 60 seconds.
Example
<h3>cfmail Example</h3>
<!--- Delete the surrounding comments to use this example.
<cfif IsDefined("form.mailto")>
<cfif form.mailto is not ""
AND form.mailfrom is not ""
AND form.Subject is not "">
<cfmail to = "#form.mailto#"
from = "#form.mailFrom#"
subject = "#form.subject#">
298
Chapter 2: ColdFusion Tags
tag does not make copies of attachments when spooling mail to disk. If you use the
Example
rsmith@company.com
<rsmith@company.com>
Rob Smith <rsmith@company.com>
"Rob Smith" <rsmith@company.com>
rsmith@company.com (Rob Smith)
attribute has the following format:
server
tag
cffile
in
SpoolEnable="No"

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents