MACROMEDIA COLDFUSION MX 61-CFML Reference page 244

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

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#">
This message was sent by an automatic mailer built with cfmail:
= = = = = = = = = = = = = = = = = = = = = = = = = = =
#form.body#
</cfmail>
<h3>Thank you</h3>
<p>Thank you, <cfoutput>#mailfrom#: your message, #subject#, has
been sent to #mailto#</cfoutput>.
</cfif>
</cfif>
<p>
<form action = "cfmail.cfm">
<pre>
TO:
<input type = "Text" name = "MailTo">
FROM: <input type = "Text" name = "MailFrom">
SUBJECT: <input type = "Text" name = "Subject">
<hr>
MESSAGE BODY:
<textarea name ="body" cols="40" rows="5" wrap="virtual"></textarea>
</pre>
<!--- establish required fields --->
<input type = "hidden" name = "MailTo_required" value = "You must enter
a recipient">
<input type = "hidden" name = "MailFrom_required" value = "You must
enter a sender">
<input type = "hidden" name = "Subject_required" value = "You must enter
a subject">
<input type = "hidden" name = "Body_required" value = "You must enter
some text">
244
Chapter 2: ColdFusion Tags
attribute has the following format:
server

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents