Class TNEFWorker

    • Constructor Detail

      • TNEFWorker

        public TNEFWorker()
    • Method Detail

      • extractBodyViaPOI

        protected void extractBodyViaPOI​(StreamDescriptor sdParent,
                                         com.levigo.jadice.document.io.UncloseableSeekableInputStream uncloseableSeekableInputStream)
      • substituteHeaderFields

        protected void substituteHeaderFields​(net.freeutils.tnef.Message msg,
                                              javax.mail.internet.MimeMessage mimeMsg)
                                       throws IOException,
                                              javax.mail.MessagingException
        Creates/Replaces header fields of the target message with a MAPIProp values of the source message.
        Parameters:
        msg - the source message.
        mimeMsg - the target message.
        Throws:
        IOException - if MAPIProp values couldn't be read.
        javax.mail.MessagingException - if a target message header couldn't be added/changed.
      • replaceRecipientInformation

        protected void replaceRecipientInformation​(net.freeutils.tnef.Message msg,
                                                   javax.mail.internet.MimeMessage mimeMsg)
      • substituteFromHeaderFieldIfEmpty

        protected void substituteFromHeaderFieldIfEmpty​(net.freeutils.tnef.Message msg,
                                                        javax.mail.internet.MimeMessage mimeMsg)
                                                 throws javax.mail.MessagingException,
                                                        IOException
        Substitute "From" header field if it is empty. See JS-1667.
        Parameters:
        msg - the source message.
        mimeMsg - the target message.
        Throws:
        javax.mail.MessagingException - if the target header field couldn't be set.
        IOException - if MAPIProp values couldn't be read.
      • substituteFromHeaderField

        protected void substituteFromHeaderField​(net.freeutils.tnef.Message msg,
                                                 javax.mail.internet.MimeMessage mimeMsg)
                                          throws IOException,
                                                 javax.mail.MessagingException
        Substitute "From" header field. See JS-1667.
        Parameters:
        msg - the source message.
        mimeMsg - the target message.
        Throws:
        IOException - if MAPIProp values couldn't be read.
        javax.mail.MessagingException - if the target header field couldn't be set.
      • substituteDateHeaderFieldIfEmpty

        protected void substituteDateHeaderFieldIfEmpty​(net.freeutils.tnef.Message msg,
                                                        javax.mail.internet.MimeMessage mimeMsg)
                                                 throws javax.mail.MessagingException,
                                                        IOException
        Substitute "Date" header field if it is empty. See JS-1667. Since version 1.6.0 javax.mail sets the the Date header to the current date if it is empty. But we would prefer the value of MAPIProp.PR_CLIENT_SUBMIT_TIME. That's why we check if it is present in the source message and overwrite the Date header set by javax.mail in the target message. See JS-1963.
        Parameters:
        msg - the source message.
        mimeMsg - the target message.
        Throws:
        javax.mail.MessagingException - if the target header field couldn't be set.
        IOException - if MAPIProp values couldn't be read.
      • substituteDateHeaderField

        protected void substituteDateHeaderField​(net.freeutils.tnef.Message msg,
                                                 javax.mail.internet.MimeMessage mimeMsg)
                                          throws IOException
        Substitute "Date" header field. See JS-1667.
        Parameters:
        msg - the source message.
        mimeMsg - the target message.
        Throws:
        IOException - if MAPIProp values couldn't be read.
      • getRtfTextBodyCharset

        public String getRtfTextBodyCharset()
      • setRtfTextBodyCharset

        public void setRtfTextBodyCharset​(String rtfTextBodyCharset)