The SMTPAppender relies on the JavaMail API. It has been tested with JavaMail
API version 1.2. The JavaMail API requires the JavaBeans Activation Framework
package. You can download the JavaMail API at
http://java.sun.com/products/javamail/ and the JavaBeans Activation Framework at
http://java.sun.com/beans/glasgow/jaf.html. For your convenience, the required jar
files are shipped with this manual under the lib/ directory as mail.jar and respectively
as activation.jar. Make sure to place these two jar files in the classpath before trying
the following examples.
A sample application called chapter4.EMail takes two parameters. The first parameter
is an integer corresponding to the number of logging events to generate. The
second parameter is the log4j configuration file to use which can be in properties or
XML format. The last logging event generated by chapter4.Email application is
always an ERROR event which has the effect of triggering the transmission of an email
message.
posted on 2005-03-01 17:02 巅峰 阅读(68) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: