text/plaintext/htmlhtmlplaintextMessage-ContextApparently-ToApproved-ByFaxTelefaxFor-ApprovalFor-CommentFor-HandlingMail-System-VersionMailerOriginating-ClientX-Mailer X-NewsreaderX-MimeOLEUser-AgentOriginator-InfoPhoneX-Envelope-FromEnvelope-ToX-Envelope-ToX-FaceX-RCPT-TOX-SenderX-X-SenderPosted-ToX-AdminErrors-ToReturn-Receipt-ToRead-Receipt-ToX-Confirm-reading-toReturn-Receipt-RequestedRegister-Mail-Reply-Requested-ByAbuse-Reports-ToX-Complaints-ToX-Report-Abuse-ToContent-AliasDelivered-ToX-LoopTranslated-ByTranslation-OfX-UIDLX-URIX-URLX-IMAPX-OriginalArrivalTimePrecedenceX-MSMail-PriorityX-PriorityContent-LengthContent-ConversionContent-ClassContent-SGML-EntityX-MIME-AutoconvertedList-DigestMailing-ListX-Mailing-ListList-SoftwareList-URLX-ListserverX-List-HostFccSpeech-ActStatusX-No-Archiveattachmentattachmentinlinebx-mail module.
The SMTP server details are provided through the Administrator. This example attaches a file. Use the full path of the file.
<cfmail to="recipient@example.com" from="sender@example.com" subject="Example email">
<cfmailparam file="/#attachment#">
Your Email Message!!
</cfmail>
The SMTP server details are provided through the Administrator. This example attaches a file. Use the full path of the file. Set the MIME type of the file by using the optional type parameter.
<cfmail to="recipient@example.com" from="sender@example.com" subject="Example email">
<cfmailparam file="/#attachment#" type="text/plain">
Your Email Message!!
</cfmail>
The SMTP server details are provided through the Administrator. This example sets an optional X-Header. Check with your email server or service provider to find out what headers are supported.
<cfmail to="recipient@example.com" from="sender@example.com" subject="Example email">
<cfmailparam name="X-Priority" value="#priority#">
Your Email Message!!
</cfmail>
The SMTP server details are provided through the Administrator. This example attaches a file using cfscript. Use the full path of the file.
cfmail(
to="recipient@example.com",
from="sender@example.com",
subject="Example email"
) {
cfmailparam( file="/#attachment#" )
writeOutput( "Your Email Message!!")
};
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.