Receives notifications of the content of a plain RFC822 or MIME message. Implement this interface and register an instance of that implementation with a MimeStreamParser
instance using its {@link org.apache.james.mime4j.parser.MimeStreamParser#setContentHandler(ContentHandler)}method. The parser uses the ContentHandler
instance to report basic message-related events like the start and end of the body of a part in a multipart MIME entity.
Throwing an exception from an event method will terminate the message processing, i.e. no new events will be generated for that message.
Events will be generated in the order the corresponding elements occur in the message stream parsed by the parser. E.g.:
startMessage() startHeader() field(...) field(...) ... endHeader() startMultipart() preamble(...) startBodyPart() startHeader() field(...) field(...) ... endHeader() body() endBodyPart() startBodyPart() startHeader() field(...) field(...) ... endHeader() body() endBodyPart() epilogue(...) endMultipart() endMessage()The above shows an example of a MIME message consisting of a multipart body containing two body parts.
See MIME RFCs 2045-2049 for more information on the structure of MIME messages and RFC 822 and 2822 for the general structure of Internet mail messages.
|
|
|
|
|
|
|
|