Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <cfscript>
  2. // Create an instance of the mail object
  3. mail=new mail();
  4.  
  5. // Set it's properties
  6. mail.setSubject( "Sample Email" );
  7. mail.setTo( "to@example.com" );
  8. mail.setFrom( "from@example.com" );
  9. mail.setCC( "cc@example.com" );
  10. mail.setBCC( "bcc@example.com" );
  11.  
  12. // Add an attachment
  13. mail.addParam( file="C:\foo.txt" );
  14.  
  15. // Add email body content in text and HTML formats
  16. mail.addPart( type="text", charset="utf-8", wraptext="72", body="This is a test message." );
  17. mail.addPart( type="html", charset="utf-8", body="<p>This is a test message.</p>" );
  18.  
  19. // Send the email
  20. mail.send();
  21. </cfscript>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement