Email::Store::Mail - An email in the database
Email::Store::Mail->store($message) my $mail = Email::Store::Mail->retrieve($msgid); my $simple = $mail->simple; print $mail->message; # Plus many additional accessors added by plugins
While a fundamental concept in Email::Store, a mail is by itself reasonably simple. It only has two properties, a message_id and a message. A utility method simple will produce a (cached) Email::Simple object representing the mail.
Email::Store
mail
message_id
message
simple
Email::Simple
When a mail is indexed with store, all the plugins are called. Plugins register a method called on_store to get their chance to play with an incoming mail, and on_store_order to determine where in the process they wish to be called in relation to other modules.
store
on_store
on_store_order
The on_store method gets passed the mail object and can examine and modify it while also doing what it needs to populate its own table(s).
When a message is stored but already exists in the database, on_seen_duplicate is called in the plugins rather than on_store. This allows, for instance, the List plugin to detect passage through addiional lists.
on_seen_duplicate
To install Email::Store, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::Store
CPAN shell
perl -MCPAN -e shell install Email::Store
For more information on module installation, please visit the detailed CPAN module installation guide.