if (needAuth.equalsIgnoreCase("true")) {
email.setAuthentication(username, password);
}
email.addTo(to);
if (cc != null && cc.length() > 0) email.addCc(cc);
if (bcc != null && bcc.length() > 0) email.addBcc(bcc);
email.setFrom(from, "ChaiDB Server");
email.setSubject(subject);
if (html) {
((HtmlEmail) email).setHtmlMsg(content);