public interface MailMessage
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String name,
String value)
Adds a header to the message
|
void |
appendBody(String line)
Appends the given text to the body.
|
void |
appendHeader(String name,
String value)
Append some text to the last existing value of a header.
|
String |
getBody()
Returns the body of the message.
|
String |
getFirstHeaderValue(String name)
A shortcut to get only the first value of a header
|
Iterator<String> |
getHeaderNames()
Gets an iterator over header names.
|
String[] |
getHeaderValues(String name)
Gets the values of a given header.
|
Iterator<String> getHeaderNames()
IteratorString[] getHeaderValues(String name)
name - the name of the header.String getFirstHeaderValue(String name)
name - is name of the headerString getBody()
void addHeader(String name, String value)
name - is the name of the header.value - is the value to add to the header.void appendHeader(String name, String value)
addHeader method because it doesn't add a new header entry,
instead it appends the given value to an existing header entry.
If the given header name doesn't exist this method will add a new header.name - is the name of the headervalue - is the value to append to the header.void appendBody(String line)
line - is the text to append.Copyright © 2017. All rights reserved.