Leser: 1
|< 1 2 >| | 16 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
koeppea@foxi:~/perl_scripts> cat htmlmail.pl
use strict;
open(PIPE,"| `which sendmail` -t") or die $!;
print PIPE << 'ENDOFDOCUMENT';
To: [EMAIL=format_c@example.org]format_c@example.org[/EMAIL]
From: [EMAIL=koeppea@example.org]koeppea@example.org[/EMAIL]
Subject: HTML-Test
Content-type: text/html
<html><head>
<title>Meine Testmail</title></head>
<body>
<h2>Das ist eine uebschrift2</h2>
</body>
</html>
ENDOFDOCUMENT
close PIPE;
print "sent\n";
koeppea@foxi:~/perl_scripts>
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
open(SM, "|$mail $in{'email'}");
print SM "From: $email\n";
print SM "Subject: $rsubject\n\n";
foreach $part (@SR_data) {
if ($parse_commands == 1) {
foreach $key (@order_array) {
$part =~ s/\<$key\>/$in{$key}/ig;
}
}
print SM $part;
}
print SM "\n\n\nGesendet mit SmartFormMail 1.3.1";
print SM " frei erhältlich bei\n";
print SM "Tectonic Designs ([URL=http://tectonicdesigns.com]http://tectonicdesigns.com[/URL])\n";
print SM << 'ENDOFDOCUMENT';
Content-type: text/html
<html><head>
<title>Meine Testmail</title></head>
<body>
<h2>Das ist eine uebschrift2</h2>
</body>
</html>
ENDOFDOCUMENT
close(SM);
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
use strict;
use CGI::Carp qw/fatalsToBrowser/;
my $mailbin = '/usr/bin/sendmail';
my $to = 'user@example.org';
my $from = 'me@example.org';
my $subject = 'Mein Thema';
my $html = qq[
<html><body><strong>Fetter Text</strong></body></html>
];
open SM,"| $mailbin" or die $!;
print SM "To: $to\n";
print SM "From: $from\n";
print SM "Subject: $subject\n";
print SM "Content-type: text/html\n";
print SM "\n";# Hier ist der Mail header zu ende!!!!!!!!
print SM $html;
close SM;
# Jetzt noch die Status Meldung für den Browser
print "Content-type: text/plain\n\n";
print "Mail sent";
exit;
|< 1 2 >| | 16 Einträge, 2 Seiten |