public class EmailUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ATTR_CHARSET |
| Constructor and Description |
|---|
EmailUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String[] |
address2String(javax.mail.Address[] addresses)
Converts mail address to strings.
|
static java.lang.String |
extractEncoding(java.lang.String contentType)
Parses content type for encoding.
|
static java.lang.String |
extractMimeType(java.lang.String contentType)
Extracts mime type from parts content type.
|
static ReceivedEmail |
parseEML(java.io.File emlFile)
Reads EML from a file and parses it into
ReceivedEmail. |
static ReceivedEmail |
parseEML(java.lang.String emlContent)
Parse EML from content into
ReceivedEmail. |
static javax.mail.internet.InternetAddress |
string2Address(java.lang.String address)
Converts string to
InternetAddress while taking care of encoding. |
protected static final java.lang.String ATTR_CHARSET
public static java.lang.String extractMimeType(java.lang.String contentType)
public static java.lang.String extractEncoding(java.lang.String contentType)
null
if encoding is not specified in content type.public static java.lang.String[] address2String(javax.mail.Address[] addresses)
public static javax.mail.internet.InternetAddress string2Address(java.lang.String address)
throws javax.mail.internet.AddressException
InternetAddress while taking care of encoding.
The email can be given in following form:
javax.mail.internet.AddressExceptionpublic static ReceivedEmail parseEML(java.io.File emlFile) throws java.io.FileNotFoundException, javax.mail.MessagingException
ReceivedEmail.java.io.FileNotFoundExceptionjavax.mail.MessagingExceptionpublic static ReceivedEmail parseEML(java.lang.String emlContent) throws javax.mail.MessagingException
ReceivedEmail.javax.mail.MessagingExceptionCopyright © 2003-2013 Jodd Team