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

renee
 2004-04-29 16:06
#28275 #28275
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Du musst nach den Header-Informationen zwei Zeilenumbrüche machen...

Dann empfehle ich Dir noch das CGI-Modul. Damit würde es ein wenig ainfacher werden:
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
#!/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(my ($key,$value) = each %FORM){
   print MAIL "$key\: $value\n";
 }

close (MAIL);
\n\n

<!--EDIT|renee|1083240409-->
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread mail adressen automatisch zuordnen