Email.java
2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
package com.framework.mail;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
public class Email implements Serializable {
private static final long serialVersionUID = -1;
/** 发件人 **/
private String from;
/** 收件人 **/
private String to;
/** 抄送给 **/
private String cc;
/** 邮件主题 **/
private String subject;
/** 邮件内容 **/
private String content;
/** 邮件附件 **/
private List<String> attachList;
/** 邮件模版 **/
private String templateName;
private Map<String, Object> contentMap;
private String bccMail;
// ////////////////////////解析邮件地址//////////////////////////////
public String[] getToArray() {
if (this.to == null || this.to.trim().length() == 0) {
return null;
}
to = to.trim();
to.replaceAll(";", ";");
to.replaceAll(" ", ";");
to.replaceAll(",", ";");
to.replaceAll(",", ";");
to.replaceAll("|", ";");
return to.split(";");
}
public String getBccMail() {
return bccMail;
}
public void setBccMail(String bccMail) {
this.bccMail = bccMail;
}
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getTo() {
return to;
}
public void setTo(String to) {
this.to = to;
}
public String getCc() {
return cc;
}
public void setCc(String cc) {
this.cc = cc;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public List<String> getAttachList() {
return attachList;
}
public void setAttachList(List<String> attachList) {
this.attachList = attachList;
}
public String getTemplateName() {
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
public Map<String, Object> getContentMap() {
return contentMap;
}
public void setContentMap(Map<String, Object> contentMap) {
this.contentMap = contentMap;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
}