Creating Email Components
Now that we've created and configured a Mail Session object to be used with our WebLogic Server installation, we can get into the business of creating email components that can send, retrieve, forward, and authenticate messages, and utilize attachments.
All the examples presuppose that you've already configured a Mail Session in the Administration Console.
Sending an email message in a WebLogic Server application involves three main steps:
Getting the mail session
Constructing the message
Sending the message
The following will walk you through each of these steps in putting together a simple program that sends a message with the SMTP protocol.
First, we must import the packages for JavaMail, ...