1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.mail.mocks;
18
19 import javax.mail.Authenticator;
20 import javax.mail.Session;
21 import javax.mail.internet.MimeMessage;
22 import javax.mail.internet.MimeMultipart;
23
24 import org.apache.commons.mail.Email;
25 import org.apache.commons.mail.EmailException;
26
27
28
29
30
31
32
33 public class MockEmailConcrete extends Email
34 {
35
36
37
38
39
40
41 @Override
42 public Email setMsg(final String msg)
43 {
44
45
46 return null;
47 }
48
49
50
51
52
53 public boolean isDebug()
54 {
55 return this.debug;
56 }
57
58
59
60
61
62 public Authenticator getAuthenticator()
63 {
64 return this.authenticator;
65 }
66
67
68
69
70 public String getCharset()
71 {
72 return this.charset;
73 }
74
75
76
77
78 public Object getContentObject()
79 {
80 return this.content;
81 }
82
83
84
85
86 public MimeMultipart getContentMimeMultipart()
87 {
88 return this.emailBody;
89 }
90
91
92
93
94 public MimeMultipart getEmailBody()
95 {
96 return this.emailBody;
97 }
98
99
100
101
102 @Override
103 public String getHostName()
104 {
105 return this.hostName;
106 }
107
108
109
110
111 public MimeMessage getMessage()
112 {
113 return this.message;
114 }
115
116
117
118
119 public String getPopHost()
120 {
121 return this.popHost;
122 }
123
124
125
126
127 public String getPopPassword()
128 {
129 return this.popPassword;
130 }
131
132
133
134
135 public String getPopUsername()
136 {
137 return this.popUsername;
138 }
139
140
141
142
143 public String getContentType()
144 {
145 return contentType;
146 }
147
148
149
150
151 public boolean isPopBeforeSmtp()
152 {
153 return popBeforeSmtp;
154 }
155
156
157
158
159
160 public Session getSession()
161 throws EmailException
162 {
163 return this.getMailSession();
164 }
165
166 }