Conguring JavaMail Resources
TheEnterprise Server includes the JavaMail API. The JavaMail API is a set of abstract APIs that
modela mail system. The API provides a platform-independent and protocol-independent
frameworkto build mail and messaging applications. The JavaMail API provides facilities for
readingand sending electronic messages. Service providers implement particular protocols.
Usingthe JavaMail API you can add email capabilities to your applications. JavaMail provides
accessfrom Java applications to Internet Message Access Protocol (IMAP) and Simple Mail
TransferProtocol (SMTP) capable mail servers on your network or the Internet. It does not
providemail server functionality; you must have access to a mail server to use JavaMail.
TheJavaMail API is implemented as a Java platform optional package and is also available as
partof the J2EE platform.
TheEnterprise Server includes the JavaMail API along with JavaMail service providers that
allowan application component to send email notications over the Internet and to read email
fromIMAP and POP3 mail servers.
Tolearn more about the JavaMail API, consult the JavaMail web site at
http://java.sun.com/products/javamail/.
Thissection contains the following topic:

Creatinga JavaMail Session

Tocongure JavaMail for use in Enterprise Server, create a Mail Session in the Enterprise Server
AdminConsole. This allows server-side components and applications to access JavaMail
serviceswith JNDI, using the Session properties you assign for them. When creating a Mail
Session,you can designate the mail hosts, transport and store protocols, and the default mail
userin the Admin Console so that components that use JavaMail do not have to set these
properties.Applications that are heavy email users benet because the Application Server
createsa single Session object and makes it available via JNDI to any component that needs it.
5
CHAPTER 5
75