| java.lang.Object com.knowgate.hipermail.HeadersHelper
HeadersHelper | public class HeadersHelper (Code) | | Set of utility functions for managing MimeMessage headers
author: Sergio Montoro Ten version: 3.0 |
HeadersHelper | public HeadersHelper(MimeMessage oMimeMsg)(Code) | | |
computeContentMD5 | public static String computeContentMD5(byte[] byArray)(Code) | | |
decodeMessageId | public static String decodeMessageId(MimeMessage oMimeMsg) throws MessagingException, UnsupportedEncodingException(Code) | | 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.
If neither Message-Id nor X-Qmail-Scanner-Message-ID nor Resent-Message-ID headers are found
then a message id is assigned by using the message sent date and from address like:
<20050722140022.sender@domain.com>
The result is then decoded by calling MimeUtility.decodeText() before being returned
Parameters: oMimeMsg - MimeMessage String Decoded value of Message Id. throws: MessagingException - throws: UnsupportedEncodingException - |
decodeMessageId | public String decodeMessageId() throws MessagingException, UnsupportedEncodingException(Code) | | 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.
If neither Message-Id nor X-Qmail-Scanner-Message-ID nor Resent-Message-ID headers are found
then a message id is assigned by using the message sent date and from address like:
<20050722140022.sender@domain.com>
The result is then decoded by calling MimeUtility.decodeText() before being returned
String Decoded value of Message Id. throws: MessagingException - throws: UnsupportedEncodingException - |
decodeMessageId | public String decodeMessageId(String sDefault)(Code) | | Get decoded Message Id
Parameters: sDefault - String Default value is a Message Id. cannot be found at message headers String |
getFlags | public static Flags getFlags(MimeMessage oMsg) throws MessagingException(Code) | | |
getFlags | public Flags getFlags() throws MessagingException(Code) | | |
getPriority | public static String getPriority(MimeMessage oMsg) throws MessagingException(Code) | | |
getPriority | public String getPriority() throws MessagingException(Code) | | |
getReceivedTimestamp | public static Timestamp getReceivedTimestamp(MimeMessage oMsg) throws MessagingException(Code) | | |
getReceivedTimestamp | public Timestamp getReceivedTimestamp() throws MessagingException(Code) | | |
getSentTimestamp | public static Timestamp getSentTimestamp(MimeMessage oMsg) throws MessagingException(Code) | | |
getSentTimestamp | public Timestamp getSentTimestamp() throws MessagingException(Code) | | |
isSpam | public static boolean isSpam(MimeMessage oMsg) throws MessagingException(Code) | | |
isSpam | public boolean isSpam() throws MessagingException(Code) | | |
|
|