以下是源代码.HtmlEmail e = new HtmlEmail();
e.setHostName("smtp.sina.cn");
e.setAuthentication("www_wyf","5201314" );
e.setCharset("utf-8");
 
try {
e.addTo("[email protected]");
e.setFrom("[email protected]" );
e.setSubject( "新用户注册验证邮件--518.wyf" );
String url ="http://localhost:8080/cp/index.jsp?u=" + loginuser + "&t=5";
e.setHtmlMsg( "<font color='red'>恭喜,你还差最后一步,就可以加入我要发,请点击下面的链接:</font><br />" + url);
// set the alternative message
e.setTextMsg("set the alternative message");
// set mail
e.send();
} catch (EmailException ex) {
// TODO Auto-generated catch block
ex.printStackTrace();
}  邮件能够发送。 可穿过去得超链接,把参数当成文字显示了。