könnte schon echt daran liegen - aber was ich dann nicht versteh - wieso es ohne Date funktioniert.
hier mal das skript:
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
use Net::SMTP;
use MIME::Base64;
$usr_name="ichichcih";
$usr_pwd="geheim";
$nachricht = "warnings.txt";
$absender = "ichichcih\@yahoo.de";
$empfaenger = "yyyyyy\@yahoo.de";
$smtpserver = "smtp.mail.yahoo.com";
$hostname = "localhost.tux";
sub mail {
# local var:
$usr_name = encode_base64("$usr_name",'');
my $usr_pwd = encode_base64("$usr_pwd",'');
my $nachricht = "$nachricht";
my $absender = "$absender";
my $betreff = "test";
my $empfaenger = "$empfaenger";
my $smtpserver = "$smtpserver";
my $hostname = "$hostname";
# SMTP-AUTH:
my $smtp = Net::SMTP->new($smtpserver, Hello => $hostname);
my $result = $smtp->command('AUTH','LOGIN');
my $answer = $smtp->getline();
$result = $smtp->command($usr_name);
$answer = $smtp->getline();
# 334 UGFzc3dvcmQ6
$result = $smtp->command($usr_pwd);
$answer = $smtp->getline();
# 235 Authentication succeeded
# Main:
$smtp->mail($absender);
$smtp->to($empfaenger);
$smtp->data();
$smtp->datasend("Subject: $betreff\n");
$smtp->datasend("To: $empfaenger\n");
$smtp->datasend("From: $absender\n");
$smtp->datasend("Date: Mon, 17 May 2004 20:22 +0200\n");
$smtp->datasend("\n");
$smtp->datasend("$nachricht");
$smtp->datasend("\n");
$smtp->dataend();
$smtp->quit;
print "mail send...done\n";
}
mail();
also damit geht's - weiß auch nicht warum.
gruss,
quetzal