Mein Code zum Mail-Modul ansprechen
sub mail() {
my $mailer = Mail::Mailer->new('smtp', Server => $server);
$mailer->open(\%headers) or die "Can't open Mailheaders: $!\n";
print "$mailer \n\n @check\n";
$mailer->close();
Auf dem Browser erscheint "Mail::Mailer::smtp=GLOB(0x9a3fb0)" beim abschicken. Habe auch schon daran gedacht das da was falsch läuft drum mal $mailer mit ausgeben lassen. @check ist leer.
Apache Errorlog:
[Tue Jul 20 15:07:43 2010] [error] [client 127.0.0.1] Use of uninitialized value in pattern match (m//) at /var/www/localhost/cgi-bin/test.pl line 34.
[Tue Jul 20 15:07:43 2010] [error] [client 127.0.0.1] Use of uninitialized value in pattern match (m//) at /var/www/localhost/cgi-bin/test.pl line 34.
[Tue Jul 20 15:07:43 2010] [error] [client 127.0.0.1] Use of uninitialized value in pattern match (m//) at /var/www/localhost/cgi-bin/test.pl line 34.
[Tue Jul 20 15:07:43 2010] [error] [client 127.0.0.1] Use of uninitialized value in pattern match (m//) at /var/www/localhost/cgi-bin/test.pl line 34.
[Tue Jul 20 15:07:43 2010] [error] [client 127.0.0.1] Use of uninitialized value in pattern match (m//) at /var/www/localhost/cgi-bin/test.pl line 34.
[Tue Jul 20 15:07:50 2010] [error] [client 127.0.0.1] Use of uninitialized value in pattern match (m//) at /var/www/localhost/cgi-bin/test.pl line 34, <STDIN> line 1., referer: http://localhost/cgi-bin/test.pl?formtype=newnametpl
[Tue Jul 20 15:07:50 2010] [error] [client 127.0.0.1] Use of uninitialized value in pattern match (m//) at /var/www/localhost/cgi-bin/test.pl line 34, <STDIN> line 1., referer: http://localhost/cgi-bin/test.pl?formtype=newnametpl
[Tue Jul 20 15:07:50 2010] [error] [client 127.0.0.1] Use of uninitialized value in pattern match (m//) at /var/www/localhost/cgi-bin/test.pl line 34, <STDIN> line 1., referer: http://localhost/cgi-bin/test.pl?formtype=newnametpl
[Tue Jul 20 15:07:50 2010] [error] [client 127.0.0.1] Use of uninitialized value in pattern match (m//) at /var/www/localhost/cgi-bin/test.pl line 34, <STDIN> line 1., referer: http://localhost/cgi-bin/test.pl?formtype=newnametpl
[Tue Jul 20 15:07:50 2010] [error] [client 127.0.0.1] Use of uninitialized value in pattern match (m//) at /var/www/localhost/cgi-bin/test.pl line 34, <STDIN> line 1., referer: http://localhost/cgi-bin/test.pl?formtype=newnametpl
Zeile 34 sieht so aus:
if ($query->url_param("formtype") =~ /newnametpl/)
Habe nochmal geprüft ob alle Variables richtig deklariert sind un konnte keinen fehler enddecken.
mfg
conray