Thread CGI, Mail::Mailer und print (6 answers)
Opened by conray at 2010-07-20 14:25

conray
 2010-07-20 15:13
#139980 #139980
User since
2010-02-19
52 Artikel
BenutzerIn
[default_avatar]
Mein Code zum Mail-Modul ansprechen
Code (perl): (dl )
1
2
3
4
5
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:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
[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:
Code (perl): (dl )
if ($query->url_param("formtype") =~ /newnametpl/) 


Habe nochmal geprüft ob alle Variables richtig deklariert sind un konnte keinen fehler enddecken.

mfg
conray

View full thread CGI, Mail::Mailer und print