Thread SendMail-Attachment: ?!: Attachment mit Perl (25 answers)
Opened by soilant at 2004-08-07 17:43

Gast Gast
 2004-08-07 20:07
#3345 #3345
Hallo Esskar,
den Code posten? Aber klar, der Code ist dieser - bin ziemlich gespannt wieso das nicht klappt... (es ist praktisch der gleiche Code wie jener von E|B)
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
...
$file = param('file');
...
$boundary = "------";
local $/;
binmode $file;
$encoded_file = MIME::Base64::encode($file);
open(MAIL, "| /usr/sbin/sendmail -n -t -oi") or die "Oh hoppala!";
print MAIL <<EOA;
From: $from
To: $to
Cc: $bc
Bcc: $bcc
Subject: $subject
Mime-Version: 1.0
Content-type: multipart/mixed; boundary="$boundary"
$boundary
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable
$text
$boundary
Content-type: image/jpeg; name="$file"
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="$file"
$encoded_file
$boundary
EOA
close(MAIL);

View full thread SendMail-Attachment: ?!: Attachment mit Perl