Class FixedRecipientMimeMessage

java.lang.Object
jakarta.mail.Message
jakarta.mail.internet.MimeMessage
com.netcetera.girders.mail.FixedRecipientMimeMessage
All Implemented Interfaces:
jakarta.mail.internet.MimePart, jakarta.mail.Part

public class FixedRecipientMimeMessage extends jakarta.mail.internet.MimeMessage
Mime message for sending mail where the To header is overwritten with the overrideToAddress and the Cc and Bcc headers are removed. The values of the original values are appended to the subject.
  • Nested Class Summary

    Nested classes/interfaces inherited from class jakarta.mail.internet.MimeMessage

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

    Fields inherited from class jakarta.mail.internet.MimeMessage

    cachedContent, content, contentStream, dh, flags, headers, modified, saved

    Fields inherited from class jakarta.mail.Message

    expunged, folder, msgnum, session

    Fields inherited from interface jakarta.mail.Part

    ATTACHMENT, INLINE
  • Constructor Summary

    Constructors
    Constructor
    Description
    FixedRecipientMimeMessage(jakarta.mail.internet.MimeMessage source, String overrideToAddress)
    Constructs a new FixedRecipientMimeMessage with content initialized from the source MimeMessage.
  • Method Summary

    Methods inherited from class jakarta.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, updateMessageID, writeTo, writeTo

    Methods inherited from class jakarta.mail.Message

    addRecipient, getFolder, getMessageNumber, getSession, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FixedRecipientMimeMessage

      public FixedRecipientMimeMessage(jakarta.mail.internet.MimeMessage source, String overrideToAddress) throws jakarta.mail.MessagingException
      Constructs a new FixedRecipientMimeMessage with content initialized from the source MimeMessage. The new message is independent of the original. See the class documentation for more information.
      Parameters:
      source - the source mime message
      overrideToAddress - the address to overwrite with
      Throws:
      jakarta.mail.MessagingException - in case the source mime message cannot be read