List of usage examples for org.apache.poi.hsmf.datatypes RecipientChunks getRecipientEmailAddress
public String getRecipientEmailAddress()
From source file:com.jaeksoft.searchlib.parser.MapiMsgParser.java
License:Open Source License
@Override protected void parseContent(StreamLimiter streamLimiter, LanguageEnum lang) throws IOException, SearchLibException { MAPIMessage msg = new MAPIMessage(streamLimiter.getNewInputStream()); msg.setReturnNullOnMissingChunk(true); ParserResultItem result = getNewParserResultItem(); try {//from ww w . j ava2 s. com result.addField(ParserFieldEnum.email_display_from, msg.getDisplayFrom()); result.addField(ParserFieldEnum.email_display_to, msg.getDisplayTo()); result.addField(ParserFieldEnum.email_display_cc, msg.getDisplayCC()); result.addField(ParserFieldEnum.email_display_bcc, msg.getDisplayBCC()); result.addField(ParserFieldEnum.subject, msg.getSubject()); result.addField(ParserFieldEnum.htmlSource, msg.getHtmlBody()); result.addField(ParserFieldEnum.content, msg.getTextBody()); result.addField(ParserFieldEnum.creation_date, msg.getMessageDate()); result.addField(ParserFieldEnum.email_conversation_topic, msg.getConversationTopic()); RecipientChunks[] recipientChuncksList = msg.getRecipientDetailsChunks(); if (recipientChuncksList != null) { for (RecipientChunks recipientChunks : recipientChuncksList) { result.addField(ParserFieldEnum.email_recipient_name, recipientChunks.getRecipientName()); result.addField(ParserFieldEnum.email_recipient_address, recipientChunks.getRecipientEmailAddress()); } } if (StringUtils.isEmpty(msg.getHtmlBody())) result.langDetection(10000, ParserFieldEnum.content); else result.langDetection(10000, ParserFieldEnum.htmlSource); } catch (ChunkNotFoundException e) { Logging.warn(e); } }
From source file:org.silverpeas.core.mail.extractor.MSGExtractor.java
License:Open Source License
private InternetAddress getInChunks(String name) throws UnsupportedEncodingException { RecipientChunks[] recipientChunks = message.getRecipientDetailsChunks(); for (RecipientChunks recipient : recipientChunks) { if (name.equals(recipient.getRecipientName())) { return new InternetAddress(recipient.getRecipientEmailAddress(), recipient.getRecipientName()); }/*from w ww . j av a 2 s . c om*/ } return null; }
From source file:org.silverpeas.util.mail.MSGExtractor.java
License:Open Source License
private InternetAddress getInChunks(String name) throws UnsupportedEncodingException { RecipientChunks[] recipientChunks = message.getRecipientDetailsChunks(); for (RecipientChunks recipient : recipientChunks) { if (name.equals(recipient.getRecipientName())) { InternetAddress address = new InternetAddress(recipient.getRecipientEmailAddress(), recipient.getRecipientName()); return address; }/*from w w w . j a v a 2 s . c o m*/ } return null; }