|< 1 2 3 4 >| | 35 entries, 4 pages |
my $Sendmail_Prog = "http://localhost/scripts/sendmail.exe";
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
#!/usr/bin/perl -w use strict; use CGI::Carp qw(fatalsToBrowser); # ------->; SMTP-Programm zum Versenden der Mail: my $Sendmail_Prog = "http:\\localhost\scripts\sendmail.exe"; # ------->; Modul für CGI-Scripts einbinden: use CGI; # ------->; Modul für CGI-Scripts zum Einlesen der Formulardaten anwenden: my $query = new CGI; my @names = $query->param; # ------->; interne Daten aus den erwarteten hidden-Feldern auslesen: my $delimiter = $query->param('delimiter'); # --->; Begrenzerzeichen zwischen name und value my $mailto = $query->param('mailto'); # --->; Empfängeradresse my $returnhtml = $query->param('return'); # --->; URL für Dankeseite my $subject = $query->param('subject'); # --->; E-Mail-Subject # ------->; Text der E-Mail aus den Formulardaten ermitteln: my $mailtext = ""; foreach(@names) { my $name = $_; my $value = ""; my @values = ""; my @values = $query->param($name); if($name ne "mailto" && $name ne "return" && $name ne "subject" && $name ne "delimiter") { foreach $value (@values) { $mailtext = $mailtext.$name; $mailtext = $mailtext.$delimiter; $mailtext = $mailtext.$value."\n"; } } } # ------->; E-Mail versenden: open(MAIL,"|$Sendmail_Prog -t") || print STDERR "Mailprogramm konnte nicht gestartet werden\n"; print MAIL "To: $mailto\n"; print MAIL "Subject: $subject\n\n"; print MAIL "$mailtext\n"; close(MAIL); # ------->; Dankeseite an Browser senden: print "Location: $returnhtml\n\n";
|< 1 2 3 4 >| | 35 entries, 4 pages |