Sends a e-mail message that contains query output, using an SMTP server.
Forms tags, Internet Protocol tags
<cfmail to = "recipient" from = "sender" cc = "copy_to" bcc = "blind_copy_to" subject = "msg_subject" type = "msg_type" maxrows = "max_msgs" mimeattach = "path" query = "query_name" group = "query_column" groupcasesensitive = "yes" or "no" startrow = "query_row" server = "servername" port = "port_id" mailerid = "headerid" timeout = "seconds" spoolenable = "yes" or "no">
cfftp, cfhttp, cfldap, cfmailparam, cfpop
New in ColdFusion MX: the SpoolEnable attribute is new.
<h3>cfmail Example</h3>
<p>This view-only example shows the use of cfmail.
<!---
<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">
<p><input type = "Submit" name = "">
</form> --->