* remove cache, cache setup is not easy, todays servers do not really * need it anymore * add prototypes and fix parameter issues * suppress redefinition
27 lines
482 B
Perl
27 lines
482 B
Perl
package mail;
|
|
|
|
use strict;
|
|
use warnings;
|
|
no warnings 'redefine';
|
|
|
|
use MIME::Lite();
|
|
|
|
sub send($) {
|
|
my $mail = shift;
|
|
|
|
my $msg = MIME::Lite->new(
|
|
'From' => $mail->{'From'},
|
|
'To' => $mail->{'To'},
|
|
'Cc' => $mail->{'Cc'},
|
|
'Reply-To' => $mail->{'Reply-To'},
|
|
'Subject' => $mail->{'Subject'},
|
|
'Data' => $mail->{'Data'},
|
|
);
|
|
|
|
$msg->print( \*STDERR );
|
|
$msg->send;
|
|
}
|
|
|
|
# do not delete next line
|
|
return 1;
|