CFMAIL

I l @ ve RuBoard

< CFMAIL >

Used to generate and send email via an SMTP mail server.

Syntax

 <cfmail to="email_address_of_recipient"          from="email_address_of_sender"         subject="subject_of_email"         type="type_of_message"         server="name_of_SMTP_server">  Mail Message </cfmail> 

Attributes

To: Required. This specifies the email address of the person who will be receiving the email. It can be either hardcoded or can be in a variable.

From: Required. The email address of the sender of the email. It too can be either hardcoded or from a variable.

Subject: Required. This is the subject of the email. This message can be static or dynamic (meaning you can specify a value or you use a ColdFusion variable).

Type: Optional. This specifies the message type. Currently only HTML is available for this attribute.

Server: Optional. The name of the SMTP server. This is usually something similar to mail.hungrycow.com. If not specified, by default it uses the value set in the Administrator. If not specified anywhere (in the code or in the Administrator), you'll get errors.

There are several other attributes that accompany this tag, including other sending options such as cc and bcc, as well as attributes to include queries in the email message.

Example

 <!--- User cfmail to send a comment form --->  <cfmail to-Schmidt@hungrycow.com         from="#form.email#         subject="Comment form from Web site"         type="HTML"         server="mail.hungrycow.com"  >  The following was submitted on the Web site<br>  #form.message# </cfmail> 
I l @ ve RuBoard


Macromedia ColdFusion 5. Training from the Source
Macromedia ColdFusion 5 Training from the Source (With CD-ROM)
ISBN: 0201758474
EAN: 2147483647
Year: 2002
Pages: 99
Authors: Kevin Schmidt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net