1 package SL::Mailer::Sendmail;
8 use parent qw(Rose::Object);
10 use Rose::Object::MakeMethods::Generic
12 scalar => [ qw(myconfig mailer form) ]
18 Rose::Object::init(@_);
20 my $email = $self->mailer->recode($self->myconfig->{email});
21 $email =~ s/[^\w\.\-\+=@]//ig;
23 my %temp_form = ( %{ $self->form }, myconfig_email => $email );
24 my $template = SL::Template::create(type => 'ShellCommand', form => \%temp_form);
25 my $sendmail = $::lx_office_conf{applications}->{sendmail} || $::lx_office_conf{mail_delivery}->{sendmail} || "sendmail -t";
26 $sendmail = $template->parse_block($sendmail);
28 $self->{sendmail} = IO::File->new("|$sendmail") || die "sendmail($sendmail): $!";
37 $self->{sendmail}->print(@_);
42 $self->{sendmail}->close;
43 delete $self->{sendmail};
46 sub keep_from_header {