Package com.icegreen.greenmail.mail
Class MovingMessage
java.lang.Object
com.icegreen.greenmail.mail.MovingMessage
Contains information for delivering a mime email.
Since a MovingMessage many be passed through many queues and
handlers before it can be safely deleted, destruction it handled
by reference counting. When an object first obtains a reference
to a MovingMessage, it should immediately call
acquire().
As soon as it has finished processing, that object must call
releaseContent(). For example usage, see foedus.processing.OutgoingImpl.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacquire()voidjakarta.mail.internet.MimeMessagevoidReads the contents of the stream until <CRLF>.<CRLF> is encountered.voidvoidvoidsetReturnPath(MailAddress fromAddress)
-
Constructor Details
-
MovingMessage
-
-
Method Details
-
getMessage
public jakarta.mail.internet.MimeMessage getMessage() -
getContent
- Throws:
IOException
-
acquire
public void acquire() -
releaseContent
public void releaseContent() -
getReturnPath
-
setReturnPath
-
addRecipient
-
removeRecipient
-
getRecipientIterator
-
readDotTerminatedContent
Reads the contents of the stream until <CRLF>.<CRLF> is encountered. It would be possible and prehaps desirable to prevent the adding of an unnecessary CRLF at the end of the message, but it hardly seems worth 30 seconds of effort.- Throws:
IOException
-