Last active
August 29, 2015 14:24
-
-
Save ivanionut/a39cefc94d0d2642efd4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| // Create an instance of the mail object | |
| mail=new mail(); | |
| // Set it's properties | |
| mail.setSubject( "Sample Email" ); | |
| mail.setTo( "[email protected]" ); | |
| mail.setFrom( "[email protected]" ); | |
| mail.setCC( "[email protected]" ); | |
| mail.setBCC( "[email protected]" ); | |
| // Add an attachment | |
| mail.addParam( file="C:\foo.txt" ); | |
| // Add email body content in text and HTML formats | |
| mail.addPart( type="text", charset="utf-8", wraptext="72", body="This is a test message." ); | |
| mail.addPart( type="html", charset="utf-8", body="<p>This is a test message.</p>" ); | |
| // Send the email | |
| mail.send(); | |
| </cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment