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.
NOTE
All the examples presuppose that you've already configured a Mail Session in the Administration Console.
Sending Messages
Sending an email message in a WebLogic Server application involves three main steps:
1. | Getting the mail session |
2. | Constructing the message |
3. | 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, ...
Get BEA WebLogic Server™ 8.1 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.