The JavaMail API provides a platform and protocol-independent framework to build mail and messaging applications. The JavaMail API allows applications to implement e-mail features easily. The GlassFish Server includes the JavaMail API along with JavaMail service providers that allow an application component to send e-mail notifications over the Internet and to read e-mail from IMAP and POP3 mail servers.
In JavaMail, the component that provides a main server and protocol abstraction is a JavaMail session. Application components can get a reference to a mail session through standard JNDI lookup or dependency injection. As a result of this, when we configure a JavaMail session, we need to provide the specific configuration data based on the mail product and protocol.
JavaMail sessions can be configured using the Admin Console or asadmin
CLI.
To create a JavaMail session using the Admin Console, complete the following steps:
1. Log...