CFML gives you the
cfmailtag/construct to easily send email in text or HTML format without any ceremony. Just register your mail servers in the administrators or the
Application.cfcand you are ready to start sending emails in a jiffy!
You can even bind the mail construct with a query, and the engine will send as many emails as rows in the query for you:
var qData = userService.getNewUsers();
subject="Welcome to FORGEBOX!",
Welcome to your FORGEBOX account! Play and just do it!
You can also send attachments to your email destinations very easily using the
mimeattachattribute or via the child
cfmailparam()construct, which allows you to send multiple attachments, or headers.
mimeattach=expandPath( "/my/path/attach.pdf" );
// body of the email.
writeOutput( 'Hi there,' );
writeOutput( 'This mail is sent to confirm that we have received your order.' );
cfmailparam( name="Reply-To", value="[email protected]" );
cfmailparam( file="c:\files\readme.txt" );
cfmailparam( file="c:\files\logo.gif" );