Thread mail adressen automatisch zuordnen (13 answers)
Opened by coax at 2004-04-29 16:04

cc
 2004-04-29 23:25
#28270 #28270
User since
2004-01-09
55 Artikel
BenutzerIn
[default_avatar]
hi renee

danke, aber habe aber probleme mit deinem script.
ein paar sachen habe korriegiert aber:
Code: (dl )
1
2
3
while(my ($key,$value) = each %FORM){
print MAIL "$key\: $value\n";
}

funktioniert noch NICHT und bekomme fehlermeldungen.


Code: (dl )
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
#!/usr/bin/perl -w

use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);


my $mailprog = '/usr/sbin/sendmail -t';

my $email = 'zzz@hotmail.com';

my %mail_address = ("France" => 'xxx@hotmail.com',
"Germany" => 'yyy@hotmail.com');

my $cgi = CGI-new;
print $cgi-header;
my %FORM = $cgi-Vars;

my $mail_destination = $mail_address{$FORM{'Destination'}};

$email = $FORM{'email'};
my $Destination = $FORM{'Destination'};
my $yourname = $FORM{'yourname'};
my $message = $FORM{'message'};


open (MAIL, "| $mailprog") || print "Can't open $mailprog!\n";
print (MAIL "From: $email\n");
print (MAIL "To: $mail_destination\n\n");

while (($key,$value) = each %FORM){
print MAIL "$key\: $value\n";

}

close MAIL;
\n\n

<!--EDIT|cc|1083281093-->

View full thread mail adressen automatisch zuordnen