public class MailHeadersHelper extends DefaultHandler
Constructor and Description |
---|
MailHeadersHelper() |
MailHeadersHelper(javax.mail.internet.MimeMessage oMimeMsg) |
Modifier and Type | Method and Description |
---|---|
static String |
computeContentMD5(byte[] byArray) |
String |
decodeMessageId()
Get decoded Message Id
|
static String |
decodeMessageId(javax.mail.internet.MimeMessage oMimeMsg)
Get decoded Message Id
|
String |
decodeMessageId(String sDefault)
Get decoded Message Id
|
String |
getContentID() |
static String |
getContentID(javax.mail.internet.MimeMessage oMsg) |
String |
getContentMD5() |
static String |
getContentMD5(javax.mail.internet.MimeMessage oMsg) |
String |
getContentType() |
static String |
getContentType(javax.mail.internet.MimeMessage oMsg) |
String |
getDescription() |
static String |
getDescription(javax.mail.internet.MimeMessage oMsg) |
String |
getDisposition() |
static String |
getDisposition(javax.mail.internet.MimeMessage oMsg) |
String |
getEncoding() |
static String |
getEncoding(javax.mail.internet.MimeMessage oMsg) |
String |
getFileName() |
static String |
getFileName(javax.mail.internet.MimeMessage oMsg) |
javax.mail.Flags |
getFlags() |
static javax.mail.Flags |
getFlags(javax.mail.internet.MimeMessage oMsg) |
javax.mail.internet.InternetAddress |
getFrom() |
String |
getMessageID() |
static String |
getMessageID(javax.mail.internet.MimeMessage oMsg) |
String |
getPriority() |
static String |
getPriority(javax.mail.internet.MimeMessage oMsg) |
Timestamp |
getReceivedTimestamp() |
static Timestamp |
getReceivedTimestamp(javax.mail.internet.MimeMessage oMsg) |
Timestamp |
getSentTimestamp() |
static Timestamp |
getSentTimestamp(javax.mail.internet.MimeMessage oMsg) |
String |
getSubject() |
static String |
getSubject(javax.mail.internet.MimeMessage oMsg) |
boolean |
isSpam() |
static boolean |
isSpam(javax.mail.internet.MimeMessage oMsg) |
void |
setMessage(javax.mail.internet.MimeMessage oMimeMsg) |
String |
toXML()
Get headers in XML format
|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
public MailHeadersHelper()
public MailHeadersHelper(javax.mail.internet.MimeMessage oMimeMsg)
public void setMessage(javax.mail.internet.MimeMessage oMimeMsg)
public static String decodeMessageId(javax.mail.internet.MimeMessage oMimeMsg) throws javax.mail.MessagingException, UnsupportedEncodingException
Get decoded Message Id
This method first calls MimeMessage.getMessageID() If nothing is returned then it tries to retrieve header X-Qmail-Scanner-Message-ID or Resent-Message-ID.oMimeMsg
- MimeMessagejavax.mail.MessagingException
UnsupportedEncodingException
public String decodeMessageId() throws javax.mail.MessagingException, UnsupportedEncodingException
Get decoded Message Id
This method first calls MimeMessage.getMessageID() If nothing is returned then it tries to retrieve header X-Qmail-Scanner-Message-ID or Resent-Message-ID.javax.mail.MessagingException
UnsupportedEncodingException
public String decodeMessageId(String sDefault)
Get decoded Message Id
sDefault
- String Default value is a Message Id. cannot be found at message headerspublic static String getContentType(javax.mail.internet.MimeMessage oMsg) throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public String getContentType() throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public static String getContentID(javax.mail.internet.MimeMessage oMsg) throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public String getContentID() throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public static String getMessageID(javax.mail.internet.MimeMessage oMsg) throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public String getMessageID() throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public static String getDisposition(javax.mail.internet.MimeMessage oMsg) throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public String getDisposition() throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public static String getContentMD5(javax.mail.internet.MimeMessage oMsg) throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public static String computeContentMD5(byte[] byArray)
public String getContentMD5() throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public static String getDescription(javax.mail.internet.MimeMessage oMsg) throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public String getDescription() throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public static String getFileName(javax.mail.internet.MimeMessage oMsg) throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public String getFileName() throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public static String getEncoding(javax.mail.internet.MimeMessage oMsg) throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public String getEncoding() throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public static String getSubject(javax.mail.internet.MimeMessage oMsg) throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public String getSubject() throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingException
javax.mail.MessagingException
public static Timestamp getSentTimestamp(javax.mail.internet.MimeMessage oMsg) throws javax.mail.MessagingException
javax.mail.MessagingException
public Timestamp getSentTimestamp() throws javax.mail.MessagingException
javax.mail.MessagingException
public static Timestamp getReceivedTimestamp(javax.mail.internet.MimeMessage oMsg) throws javax.mail.MessagingException
javax.mail.MessagingException
public Timestamp getReceivedTimestamp() throws javax.mail.MessagingException
javax.mail.MessagingException
public static String getPriority(javax.mail.internet.MimeMessage oMsg) throws javax.mail.MessagingException
javax.mail.MessagingException
public String getPriority() throws javax.mail.MessagingException
javax.mail.MessagingException
public static javax.mail.Flags getFlags(javax.mail.internet.MimeMessage oMsg) throws javax.mail.MessagingException
javax.mail.MessagingException
public javax.mail.Flags getFlags() throws javax.mail.MessagingException
javax.mail.MessagingException
public javax.mail.internet.InternetAddress getFrom() throws javax.mail.MessagingException
javax.mail.MessagingException
public static boolean isSpam(javax.mail.internet.MimeMessage oMsg) throws javax.mail.MessagingException
javax.mail.MessagingException
public boolean isSpam() throws javax.mail.MessagingException
javax.mail.MessagingException
public String toXML()
Get headers in XML format
Copyright © 2019. All rights reserved.