JSP and JavaMail (1)

xiaoxiao2021-03-17  210

Original CN-Java original: javazealot

1 Introduction:

The development of the Java Mail API is a good example of sunes with the sustainable effort of Java developers with public API frameworks. Promote a public framework, opposing a resolution of the supplier, fully predicting an increasingly open development environment.

The structure of the Java Mail API itself proves that one of its developers - the workload of software development should depend on the complexity of the application itself and the degree of control required by the developer. In other words, Java Mail APIs are as simple as possible. At first glance, the total number of classes and classes between Javamail APIs may make people misunderstand long learning time. In fact, once it is officially started, you will find that the API does not loses a simple tool to join a robust mail / communication support in the application.

2. Installation:

Before installing, make sure you have a standard version of JDK and web servers on your machine, and configured, please refer to other articles (online everywhere).

(1). Install the JavaMail API. The most commonly used JavaMail API version is now 1.3.

To use the JavaMail 1.3 API, download the JavaMail 1.3 implementation, unlock the javamail-1_3.zip file and add the mail.jar file to the classpath. In addition to core classes, there are also SMTP, IMAP4, and POP3 vendors with versions 1.3.

(2) Installation of .javabeans Activation Framework (version 1.0.2)

All versions of the JavaMail API require JavaBeans Activation Framework to support input and corresponding processing of any data block. There is not much function, but you can find this basic MIME support in many browsers and email tools. After downloading the frame, unpack the JAF1_0_2.zip file and add the activation.jar file to the classpath.

Note: If you use the JDK is J2EE, there is nothing to do with the basic JavaMail API; J2EE's class can handle, because it contains JavaMail API and JAF, you only need to make J2EE.JAR files are added to your classpath and are all set.

转载请注明原文地址:https://www.9cbs.com/read-129494.html

New Post(0)