1. 首先建立一个简单的邮件Model
package com.itmg.tool.email;
import java.io.Serializable;
public class MailModel implements Serializable {
private static final long serialVersionUID = 1L;
private String subjectText;
private String bodyText;
private String[] receiver;
private String content_format = "text/html; charset=UTF-8";
private boolean isdebug = false;
public MailModel() {
// TODO Auto-generated constructor stub
}
public String getBodyText() {
return bodyText;
}
public void setBodyText(String bodyText) {
this.bodyText = bodyText;
}
public String[] getReceiver() {
return receiver;
}
public void setReceiver(String[] receiver) {
this.receiver = receiver;
}
public String getSubjectText() {
return subjectText;
}
public void setSubjectText(String subjectText) {
this.subjectText = subjectText;
}
public String getContent_format() {
return content_format;
}
public void setContent_format(String content_format) {
this.content_format = content_format;
}
public boolean isIsdebug() {
return isdebug;
}
public void setIsdebug(boolean isdebug) {
this.isdebug = isdebug;
}
}