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

cc
 2004-04-30 03:36
#28271 #28271
User since
2004-01-09
55 Artikel
BenutzerIn
[default_avatar]
herzlichen dank !

jetzt funktioniert:
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
#!/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");

foreach my $key(keys(%FORM)){
print MAIL $key,":\t",$FORM{$key},"\n";
}

close MAIL;

View full thread mail adressen automatisch zuordnen