Sisimai::Bite::Email::UserDefined(3pm) | User Contributed Perl Documentation | Sisimai::Bite::Email::UserDefined(3pm) |
Sisimai::Bite::Email::UserDefined - User defined MTA module as an example
use lib '/path/to/your/lib/dir'; use Your::Custom::Bite::Email::Module; use Sisimai::Mail; use Sisimai::Data; use Sisimai::Message; my $file = '/path/to/mailbox'; my $mail = Sisimai::Mail->new($file); my $mesg = undef; my $data = undef; while( my $r = $mail->read ){ $mesg = Sisimai::Message->new( 'data' => $r, 'load' => ['Your::Custom::Bite::Email::Module'] ); $data = Sisimai::Data->make('data' => $mesg); ... }
Sisimai::Bite::Email::UserDefined is an example module as a template to implement your custom MTA module.
"description()" returns description string of this module.
print Your::Custom::Bite::Email::Module->description;
"smtpagent()" returns MTA name.
print Your::Custom::Bite::Email::Module->smtpagent;
"scan()" method parses a bounced email and return results as a array reference. See Sisimai::Message for more details.
azumakuniyuki
Copyright (C) 2015-2018 azumakuniyuki, All rights reserved.
This software is distributed under The BSD 2-Clause License.
2018-11-15 | perl v5.28.0 |