Thread Automatisch Mail versenden???: sendmail??? (14 answers)
Opened by Tom at 2003-10-13 18:10

jan10001
 2003-10-13 18:51
#5474 #5474
User since
2003-08-14
962 Artikel
BenutzerIn
[default_avatar]
z.B. so:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

$mailprog = "/usr/sbin/sendmail -t";
$mailaddr = "test\@t-online.de";
$user_email ="absender\@xxx.de";

open(MAIL, "|$mailprog") or die &error_sub($!);
print MAIL "To: $mailaddr\n";
print MAIL "From: $user_email\n";
print MAIL "Subject: Test\n\n";
print MAIL "dein Inhalt\n";
close(MAIL);

sub error_sub {
print "Content-Type: text/html\n\n";
print "Leider konnte nichts gesendet werden!";
}

exit;

View full thread Automatisch Mail versenden???: sendmail???