sendMail

session.sendMail( String subject, String body, String recipients, String attachments, String headers ) (enterprise edition only)
Description
Sends an email using the given subject and body to the given comma-separated recipients. The attachments (optional) property should be a comma-separated list of paths designating files that should be sent as attachments with the email. The headers (optional) parameter allows you to designate arbitrary SMTP headers to be used when sending the email. Note that in order for this to work properly a valid mail server must have been previously designated in the settings dialog box.
Example
// Sends an email message with the parameters shown.
session.sendMail( "Test message", "This is the body of the email", "my_friend@mydomain.com", null, null );