数据库已成功连接,不过tomcat有如下警告,个人认为以上发邮件不成功与如下警告无关,希望知道的人说下,谢谢(知道一下警告怎么解决的也说一下)警告: Unknown default host: localhost严重: The web application [] registered the JBDC driver [org.logicalcobwebs.proxool.ProxoolDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2010-11-19 5:45:14 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2010-11-19 5:45:14 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] appears to have started a thread named [HouseKeeper] but has failed to stop it. This is very likely to create a memory leak.
2010-11-19 5:45:14 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
2010-11-19 5:45:14 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2010-11-19 5:45:14 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] appears to have started a thread named [HouseKeeper] but has failed to stop it. This is very likely to create a memory leak.
2010-11-19 5:45:14 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
你试试apache 的commons-email-1.2.jar邮件包试试 HtmlEmail email = new HtmlEmail();
email.setHostName("mail.myserver.com");
email.addTo("[email protected]", "John Doe");
email.setFrom("[email protected]", "Me");
email.setSubject("Test email with inline image"); URL url = new URL("http://www.apache.org/images/asf_logo_wide.gif");
String cid = email.embed(url, "Apache logo");
email.setHtmlMsg("<html>The apache logo - <img src=\"cid:"+cid+"\"></html>"); email.setTextMsg("Your email client does not support HTML messages"); email.send();
没用过这个,哪天试试。
问一下,这个和javamail比,有什么有点?