Constructor and Description |
---|
MockMail()
Create a mail message
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBody()
Get the body so we can verify against it
|
java.lang.String |
getSubject()
Get the subject so we can verify against it
|
void |
send()
Send the actual message
|
void |
setBCCRecipients(java.lang.String[] emailAddrs)
Sets the BCC recipients of the email message
|
void |
setBody(java.lang.String bodyIn)
Set the text of the email message
|
void |
setCCRecipients(java.lang.String[] emailAddrs)
Sets the CC recipients of the email message
|
void |
setExpectedSendCount(int count)
Set the expected number of times send() will be called
|
void |
setFrom(java.lang.String from)
Set the from field of the email message
|
void |
setHeader(java.lang.String name,
java.lang.String value)
Set a header value for the message
|
void |
setRecipient(java.lang.String recipIn)
Set the recipient of the email message.
|
void |
setRecipients(java.lang.String[] recipIn)
Set the recipient of the email message.
|
void |
setSubject(java.lang.String subIn)
Set the subject of the email message
|
void |
verify()
Verify that the mailer sent enough email.
|
public void setRecipient(java.lang.String recipIn)
setRecipient
in interface Mail
recipIn
- The intended recipient.public void setRecipients(java.lang.String[] recipIn)
setRecipients
in interface Mail
recipIn
- Array of Recipients to whom to send.public void setCCRecipients(java.lang.String[] emailAddrs)
setCCRecipients
in interface Mail
emailAddrs
- Array of email addrs to whom to send.public void setBCCRecipients(java.lang.String[] emailAddrs)
setBCCRecipients
in interface Mail
emailAddrs
- Array of email addrs to whom to send.public void setFrom(java.lang.String from)
public void setHeader(java.lang.String name, java.lang.String value)
public void setSubject(java.lang.String subIn)
setSubject
in interface Mail
subIn
- Subject of email message.public void setBody(java.lang.String bodyIn)
public void setExpectedSendCount(int count)
count
- the expected countpublic java.lang.String getSubject()
public java.lang.String getBody()
public void verify()