Hi,

I'm trying to send mail with Mail::Sender, and have a somewhat strange
behaviour. This is the code:

sub mailgood {
        #print "mailing good...\n";
        $mail=new Mail::Sender {
                from => $watchini->val("mailparam","from"),
                to => $watchini->val("mailparam","to"),
                smtp => $watchini->val("mailparam","smtp"),
                subject => $watchini->val("mailparam","goodsubject"),
                priority => "5",
                debug => $DEBUG,
                debug_level => 4,
        };
        $mailmessage="Keine Probleme mit $myname\n" . $logmessage;
        $mail->MailMsg ({msg => $mailmessage}) or print LOG "Error mailing
$mail\n";
        print "$Mail::Sender::Error\n";
        print ref $mail;
}

before I had the "print $Mail::Sender::Error" statement in there, I didn't
even see that it doesn't work. The debug log is just empty (of course $DEBUG
is set, and I get a file, but it stays empty). Also the print ref $mail just
prints out "Mail::Sender", while documentation says there should be numeric
code?

I could finally find out that I can't connect to the server from my machine,
but only after I've put that Mail::Sender::Error statement there, so
obviously I'm doing something wrong with Errorhandling, else it would have
been in debug.log...

regards, Lars
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to