use Mail::Sender; use strict; sub handler { #print "hier fängts an
"; sendMail(to=>"meineadresse\@xyz123.de", subject=>"Test-Betreff", msg=>"Test-Text"); #print "und hier hörts auf"; return 0; } sub sendMail { my %args = @_; my $sender = new Mail::Sender { smtp => 'localhost', from => 'vonhier123@xyz123.de', # auth => 'LOGIN', # authid => 'username', # authpwd => 'passwort', on_errors => undef, }; $sender->MailMsg({to => $args{'to'}, subject => $args{'subject'}, msg => $args{msg}}); } 1;