Apache2-WebApp-Plugin-Mail
view release on metacpan or search on metacpan
lib/Apache2/WebApp/Plugin/Mail.pm view on Meta::CPAN
#~~~~~~~~~~~~~~~~~~~~~~~~~~~[ OBJECT METHODS ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#----------------------------------------------------------------------------+
# send_text( \%controller, \%data )
#
# Send a template based (text) message.
sub send_text {
my ( $self, $c, $data_ref )
= validate_pos( @_,
{ type => OBJECT },
{ type => HASHREF },
{ type => HASHREF }
);
my $msg = MIME::Lite::TT->new(
From => $data_ref->{from} || $c->config->{project_email},
To => $data_ref->{to},
Subject => $data_ref->{subject},
Template => $data_ref->{template}->{file},
lib/Apache2/WebApp/Plugin/Mail.pm view on Meta::CPAN
$msg->send();
}
#----------------------------------------------------------------------------+
# send_html( \%controller, \%data )
#
# Send a template based (HTML/Text) multi-formatted message.
sub send_html {
my ( $self, $c, $data_ref )
= validate_pos( @_,
{ type => OBJECT },
{ type => HASHREF },
{ type => HASHREF }
);
my $msg = MIME::Lite::TT::HTML->new(
From => $data_ref->{from} || $c->config->{project_email},
To => $data_ref->{to},
Subject => $data_ref->{subject},
Encoding => 'quoted-printable',
( run in 0.291 second using v1.01-cache-2.11-cpan-4d50c553e7e )