In the following example, an SMTP mail handling component is created using CFOBJECT.
<CFOBJECT ACTION=CREATE
NAME=MAILER
CLASS=SMTP.Mailer>
The component needs to be created by ColdFusion before any methods in the component can be invoked or properties assigned in your application pages. This (hypothetical) SMTP component includes a large number of methods and properties you can use to perform a wide range of mail handling tasks. Methods perform actions and have return values you can use. Properties often return information or store information about a component. They do not execute and may not include any parameters. In the OLE/COM Viewer, methods and properties may be grouped together, making it a little confusing at first to determine one from the other.
Our hypothetical SMTP mail component includes properties such as:
- BodyText
- ConfirmRead
- ContentType
- FromName
- FromAddress
You use these properties to define elements of the mail message you want to send. The SMTP Mailer component also includes a number of methods, such as:
- SendMail
- AddRecipient
- AddCC
- AddAttachment
|