Tripletail
view release on metacpan or search on metacpan
lib/Tripletail/Sendmail/Sendmail.pm view on Meta::CPAN
# -----------------------------------------------------------------------------
# Tripletail::Sendmail::Sendmail - Sendmailã¡ã¼ã«éä¿¡
# -----------------------------------------------------------------------------
package Tripletail::Sendmail::Sendmail;
use base 'Tripletail::Sendmail';
use strict;
use warnings;
use Tripletail;
1;
sub _new {
my $class = shift;
my $group = shift;
my $this = bless {} => $class;
$this->{group} = $group;
$this->{log} = $TL->INI->get($group => 'logging');
$this->{commandline} = $TL->INI->get($group => 'commandline', '/usr/sbin/sendmail -t -i');
$this;
}
sub send {
my $this = shift;
my $data = $this->_getoptSend(@_);
open my $sendmail, '|' . $this->{commandline}
or die __PACKAGE__."#send: failed to execute the sendmail command. [$this->{commandline}] (sendmailã³ãã³ãã使ç¨ã§ãã¾ãã)\n";
my $senddata = $data->{data};
$senddata =~ tr/\r//d;
print $sendmail $senddata;
$this;
}
__END__
=encoding utf-8
=for stopwords
Ini
YMIRLINK
commandline
=head1 NAME
Tripletail::Sendmail::Sendmail - Sendmail ã¡ã¼ã«éä¿¡
=head1 DESCRIPTION
sendmailã³ãã³ããå©ç¨ãã¦ã¡ã¼ã«ãéä¿¡ããã
=head2 METHODS
=over 4
=item new
=item send
$smail->send(-data => $data)
$smail->send(-data => $data)
å®å
㯠C<-data> ã®ããããã sendmail ãæ½åºããéä¿¡ããã
=back
=head2 Ini ãã©ã¡ã¼ã¿
=over 4
( run in 1.000 second using v1.01-cache-2.11-cpan-98e64b0badf )