Discuss Java mail architecture with suitable diagram and explain its components.
As said above the java application uses JavaMail API to compose, send and receive emails. The following figure illustrates the architecture of JavaMail:
The abstract mechanism of JavaMail API is similar to other APIs, such as JDBC, JNDI etc. As seen the architecture diagram above, JavaMail API is divided into two main parts:
• An application-independent part.:- An application-programming interface (API) is used by the application components to send and receive mail messages, independent of the underlying provider or protocol used.
• A service-dependent part:- A service provider interface (SPI) speaks the protocol-specific languages, such as SMTP, POP, IMAP, and Network News Transfer Protocol (NNTP). It is used to plug in a provider of an e-mail service to the java platform.
Comments
Post a Comment