url.append("/html/photo/show.vm?sid=");
url.append(pbean.getSite().getId());
url.append("&pid=");
url.append(pbean.getId());
String curTime = new SimpleDateFormat("yyyy-MM-dd HH:mm")
.format(new Date());
StringBuffer img = new StringBuffer();
img.append(urlPrefix);
img.append(contextPath);
img.append(pbean.getPreviewURL());
String[] s_mails = new String[mails.size()];
mails.toArray(s_mails);
try {
// �����ʼ�
String mail_content = MessageFormat.format(template,
new String[]{loginUser.getNickname(),img.toString(), url.toString(),curTime});
//System.out.println(mail_content);
Parser html = new Parser();
html.setEncoding(Globals.ENC_8859_1);
html.setInputHTML(mail_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(mail_content);
sender.setMailTo(s_mails, "to");
MailTransportQueue queue = (MailTransportQueue) getServlet()
.getServletContext().getAttribute(
Globals.MAIL_QUEUE);