App-FonBot-Daemon
view release on metacpan or search on metacpan
lib/App/FonBot/Plugin/Email.pm view on Meta::CPAN
sub fini{
$log->info('finishing '.__PACKAGE__);
POE::Kernel->post($session, 'shutdown')
}
sub email_handle_new{
for my $file (bsd_glob 'Maildir/new/*', GLOB_NOSORT) {
my $email=Email::MIME->new(scalar read_file $file);
#untaint $file
$file =~ /^(.*)$/;
$file = $1;
unlink $file;
return unless defined $email;
my $replyto=$email->header('From');
return unless defined $replyto;
my ($user,$password)=split ' ', $email->header('Subject'), 2;
( run in 0.316 second using v1.01-cache-2.11-cpan-d6f9594c0a5 )