Portlet Factory sample demonstrates how to build a model that uses the javax.mail API to send an email.
Notes on running the sample and prerequisites
Import the attached zip file into your project using the Import WebSphere Portlet Factory Archive command.
The model creates a form with fields for recipient, subject and message. When the form is submitted, the model calls the sendMail() method from the EmailSample Linked Java Object.
To send an email using this example, open the class EmailSample.java and enter your own information for "mail.smtp.host" and "mail.from".