NAME

Mail::Miner::Message - Backend methods for Mail::Miner message processing

DESCRIPTION

This module implements some backend functionality for dealing with messages processed by Mail::Miner, both processing messages before storing them in the database, and for formatting and displaying them afterwards.

process

This subroutine is the main backend to processing incoming messages. It saves a message represented as a MIME::Entity object into the database, separates off attachments, and then updates the database copy with the "flattened" version. Finally, it calls the process subroutines of all the Mail::Miner::Recogniser modules that it can find, allowing them to register assets.

store_message

This non-exported subroutine stores a MIME::Entity object into the database, returning its message number. It does not store the body of the message, which is done by update_body. This is done so that we can first get a message number, link attachments to the message, strip off the attachments, and then store the stripped-down body.

update_body

update_body($id, $entity)

This is a utility sub to update a message's entry in the database with a new set of content, after it's been munged by the attachment handling code.

report

report(%options)

This is a front-end reporting option to be used from the mm command line.