public final class EmailMessage extends Object
Modifier and Type | Field and Description |
---|---|
static String |
HEADER_FROM |
static String |
HEADER_SUBJECT |
static String |
HEADER_TO |
Constructor and Description |
---|
EmailMessage(String content) |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String key,
String value)
Adds a new header to this email message
|
String |
getContent()
Returns the contents of the email
|
String |
getHeader(String key)
Returns the value of one of the headers of this email
|
Map<String,String> |
getHeaders()
Returns an unmodifiable view over the email headers
|
public static final String HEADER_FROM
public static final String HEADER_TO
public static final String HEADER_SUBJECT
public EmailMessage(String content)
public void addHeader(String key, String value)
key
- the header namevalue
- the header valuepublic String getHeader(String key)
key
- the header namenull
public Map<String,String> getHeaders()
public String getContent()
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.