Skip to content
Permalink
Browse files
Applied patch for TRANSPORTS-27.
  • Loading branch information
Sagara Gunathunga committed Feb 28, 2012
1 parent 66faa9a commit cbb81dedecc4731698746d5fee2c60f9a0b50901
Showing 2 changed files with 13 additions and 1 deletion.
@@ -97,5 +97,8 @@ public class MailConstants {
/** @see org.apache.axis2.transport.mail.WSMimeMessage */
public static final String MAIL_HEADER_X_MESSAGE_ID= "X-Message-ID";
public static final String TRANSPORT_MAIL_CUSTOM_HEADERS = "transport.mail.custom.headers";


public static final String MAIL_SENT_DATE = "sent-date";
public static final String MAIL_RECEIVED_DATE = "received-date";

}
@@ -494,6 +494,15 @@ private void processMail(Message message, PollTableEntry entry)
// save original mail message id message context MessageID
msgContext.setMessageID(outInfo.getRequestMessageID());

//Set the Sent date and received date.
if(message.getSentDate() != null) {
Calendar sentDate = Calendar.getInstance();
sentDate.setTime(message.getSentDate());
msgContext.setProperty(MailConstants.MAIL_SENT_DATE,sentDate);
}

msgContext.setProperty(MailConstants.MAIL_RECEIVED_DATE,Calendar.getInstance());

// set the message payload to the message context
InputStream in = messagePart.getInputStream();
try {

0 comments on commit cbb81de

Please sign in to comment.