return ServiceUtil.returnSuccess();
}
public static Map<String,Object> logIncomingMessage(DispatchContext dctx, Map<String, ? extends Object> context) {
MimeMessageWrapper wrapper = (MimeMessageWrapper) context.get("messageWrapper");
Debug.logInfo("Message recevied : " + wrapper.getSubject(), module);
Debug.logInfo("-- Content Type : " + wrapper.getContentType(), module);
Debug.logInfo("-- Number of parts : " + wrapper.getMainPartCount(), module);
Debug.logInfo("-- Number of attachments : " + wrapper.getAttachmentIndexes().size(), module);
Debug.logInfo("-- Message ID : " + wrapper.getMessageId(), module);
Debug.logInfo("### MESSAGE ###\n\n" + wrapper.getMessageBody(), module);
List<String> attachmentIndexes = wrapper.getAttachmentIndexes();
if (attachmentIndexes.size() > 0) {
Debug.logInfo("### ATTACHMENTS ###", module);
for (String idx : attachmentIndexes) {
Debug.logInfo("### -- Filename : " + wrapper.getPartFilename(idx), module);
Debug.logInfo("### -- Content Type : " + wrapper.getPartContentType(idx), module);
}
}
return ServiceUtil.returnSuccess();