/**
Activate the specified options, such as the smtp host, the
recipient, from, etc. */
public
void activateOptions() {
Session session = createSession();
msg = new MimeMessage(session);
try {
addressMessage(msg);
if(subject != null) {
try {
msg.setSubject(MimeUtility.encodeText(subject, "UTF-8", null));
} catch(UnsupportedEncodingException ex) {
LogLog.error("Unable to encode SMTP subject", ex);
}
}
} catch(MessagingException e) {
LogLog.error("Could not activate SMTPAppender options.", e );
}
if (evaluator instanceof OptionHandler) {
((OptionHandler) evaluator).activateOptions();
}
}
SMTPAppender.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:daq-eclipse
作者:
评论列表
文章目录