Sends e-mail messages by an SMTP server.
<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">
cfftp,
cfhttp,
cfldap,
cfmailparam,
cfpop
<!--- This view-only example shows the use of cfmail ---> <html> <head> <title>cfmail Example</title> </head> <body bgcolor = silver> <H3>cfmail Example</H3> <P>This view-only example shows the use of cfmail. If your CFAS mail settings are configured successfully and the comments are removed, you will be able to use this code to send simple e-mail. <!--- <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" method = "POST"> <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 for this message"> <input type = "hidden" name = "MailFrom_required" value = "You must enter a sender for this message"> <input type = "hidden" name = "Subject_required" value = "You must enter a subject for this message"> <input type = "hidden" name = "Body_required" value = "You must enter some text for this message"> <P><input type = "Submit" name = ""> </form> ---> ...