html.setEncoding(Globals.ENC_8859_1);
html.setInputHTML(notify_content);
Node[] nodes = html.extractAllNodesThatMatch(
HtmlNodeFilters.titleFilter).toNodeArray();
String title = nodes[0].toPlainTextString();
MailSender sender = MailSender.getHtmlMailSender(null, 25,
null, null);
sender.setSubject(title);
sender.setSendDate(new Date());
sender.setMailContent(notify_content);
sender.setMailTo(new String[] { rbean.getDiary().getOwner()
.getContactInfo().getEmail() }, "to");
MailTransportQueue queue = (MailTransportQueue) getServlet()
.getServletContext().getAttribute(
Globals.MAIL_QUEUE);
// д��������ʼ�����
queue.write(site_id, sender
.getMimeMessage());
if(log.isDebugEnabled())
log.debug("Notification mail was written to the sending queue.");
} catch (Exception e) {
log.error("send notification mail failed.", e);