Class WSMimeMessage

  • All Implemented Interfaces:
    javax.mail.internet.MimePart, javax.mail.Part

    public class WSMimeMessage
    extends javax.mail.internet.MimeMessage
    The default MimeMessage does not let us set a custom MessageID on a message being sent. This class allows us to overcome this limitation, but SMTP servers such as GMail, re-writes this to an ID they define. Thats why the custom header defined by MailConstants.MAIL_HEADER_X_MESSAGE_ID has been introduced, so that a client can find out the relationship of a response to his request
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage

        javax.mail.internet.MimeMessage.RecipientType
    • Field Summary

      • Fields inherited from class javax.mail.internet.MimeMessage

        cachedContent, content, contentStream, dh, flags, headers, modified, saved
      • Fields inherited from class javax.mail.Message

        expunged, folder, msgnum, session
      • Fields inherited from interface javax.mail.Part

        ATTACHMENT, INLINE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getBytesSent()  
      protected void updateMessageID()  
      void writeTo​(OutputStream out, String[] ignoreHeaders)  
      • Methods inherited from class javax.mail.internet.MimeMessage

        addFrom, addHeader, addHeaderLine, addRecipients, addRecipients, createInternetHeaders, createMimeMessage, getAllHeaderLines, getAllHeaders, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getFlags, getFrom, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getMessageID, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getReceivedDate, getRecipients, getReplyTo, getSender, getSentDate, getSize, getSubject, isMimeType, isSet, parse, removeHeader, reply, reply, saveChanges, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFlags, setFrom, setFrom, setFrom, setHeader, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, setText, updateHeaders, writeTo
      • Methods inherited from class javax.mail.Message

        addRecipient, getFolder, getMessageNumber, getSession, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient
    • Method Detail

      • updateMessageID

        protected void updateMessageID()
                                throws javax.mail.MessagingException
        Overrides:
        updateMessageID in class javax.mail.internet.MimeMessage
        Throws:
        javax.mail.MessagingException
      • writeTo

        public void writeTo​(OutputStream out,
                            String[] ignoreHeaders)
                     throws javax.mail.MessagingException,
                            IOException
        Overrides:
        writeTo in class javax.mail.internet.MimeMessage
        Throws:
        javax.mail.MessagingException
        IOException
      • getBytesSent

        public long getBytesSent()