1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.mail.mocks;
17
18 import java.io.IOException;
19 import java.util.List;
20
21 import javax.mail.MessagingException;
22 import javax.mail.internet.InternetAddress;
23
24 import org.apache.commons.mail.HtmlEmail;
25
26
27
28
29
30
31
32
33
34 public class MockHtmlEmailConcrete extends HtmlEmail
35 {
36
37
38
39
40 public String getMsg()
41 {
42 try
43 {
44 return this.getPrimaryBodyPart().getContent().toString();
45 }
46 catch (IOException ioE)
47 {
48 return null;
49 }
50 catch (MessagingException msgE)
51 {
52 return null;
53 }
54 }
55
56
57
58
59
60 public String getTextMsg()
61 {
62 return this.text;
63 }
64
65
66
67
68
69 public String getHtmlMsg()
70 {
71 return this.html;
72 }
73
74
75
76
77 public List getInlineImages()
78 {
79 return inlineImages;
80 }
81
82
83
84
85 public InternetAddress getFromAddress()
86 {
87 return this.fromAddress;
88 }
89
90
91
92
93 public List getToList()
94 {
95 return this.toList;
96 }
97
98
99
100
101 public List getBccList()
102 {
103 return this.bccList;
104 }
105
106
107
108
109 public List getCcList()
110 {
111 return this.ccList;
112 }
113
114 }