Email::Folder::Search
version 0.011
Search email from mailbox file. This module is mainly to test that the emails are received or not.
use Email::Folder::Search; my $folder = Email::Folder::Search->new('/var/spool/mbox'); my %msg = $folder->get_email_by_address_subject(email => 'hello@test.com', subject => qr/this is a subject/); $folder->clear();
takes the name of a folder, and a hash of options
options:
The seconds that get_email_by_address_subject will wait if the email cannot be found.
get emails with receiver address and subject(regexp). Return an array of messages which are hashref.
my $msgs = search(email => 'hello@test.com', subject => qr/this is a subject/);
clear the content of mailbox
init Email folder for test
Email::Folder
To install Email::Folder::Search, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::Folder::Search
CPAN shell
perl -MCPAN -e shell install Email::Folder::Search
For more information on module installation, please visit the detailed CPAN module installation guide.