//转换为html邮件并发送,另有一个参数可以指定发件人名称
AsyncToken token = getAsyncJavaMailSender().send(SimpleMailMessageUtils.toHtmlMsg(msg,"rapid小明"));
//处理邮件发送结果
token.addResponder(new IResponder() {
public void onFault(Exception fault) {
System.out.println("[ERROR] confirmOrder mail send fail,cause:"+fault);
}
public void onResult(Object result) {
System.out.println("[INFO] confirmOrder mail send success");