im prinzip schon. Ich empfehle Dir das Modul Mail::Mailer zu installieren und es folgendermaßen zu machen:
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
[...]
elsif($params{submit}){
my $sendmail = '/usr/sbin/sendmail -t';
my $sender = 'Piero <gior@imap.de>';
my $empfaenger = 'Du <gior@imap>';
my $betreff = 'Artikelliste';
my $body = qq~<table><tr><td>Benutzer</td><td>$params{BENUTZER}</td></tr>
<tr><td>Abteilung</td><td>$params{ABTEILUNG}</td></tr>
<tr><td>Kostenstelle</td><td>$params{KST}</td></tr>
<tr><td>Datum</td><td><$params{DATUM}</td></tr></table>
~;
$body = '<table border="1"><th>Artikel</th><th>Stueck</th><th>Preis</th>';
my @artikel = split(/;/,$params{alt});
foreach(@artikel){
my ($art,$st,$eur) = split(/#/,$_);
$body .= '<tr><td>'.$art.'</td><td>'.$st.</td><td>'.$eur.'</td></tr>';
}
$body .= '</table>';
require Mail::Mailer qw(sendmail);
my $mail = Mail::Mailer->new('sendmail')
or die "Couldn't create a mail object!\n";
my $mail_headers = {
'Content-Type' => 'text/html',
To => $empfaenger,
From => $sender,
Subject => $betreff,
};
$mail->open( $mail_headers );
$mail->print($body);
$mail->close();
$template->param(MESSAGE => 'E-Mail wurde abgeschickt';
}[...]
\n\n
<!--EDIT|renee|1084185075-->