Hi,
ich wollte grad per Mail::Sender eine email verschicken, unter Windows.
das einzige was passiert ist dass ich eine -3 (Connect failed) zurückbekomme.
ich hab das script dann mal unter Linux laufen lassen, und dort funktioniert es ...
nen proxy brauch ich keinen, weil das ein interner mailserver ist.
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
#!/usr/bin/perl
use strict;
use warnings;
use Mail::Sender;
#-1 = $smtphost unknown
#-2 = socket() failed
#-3 = connect() failed
#-4 = service not available
#-5 = unspecified communication error
#-6 = local user $to unknown on host $smtp
#-7 = transmission of message failed
#-8 = argument $to empty
#-9 = no message specified in call to MailMsg or MailFile
#-10 = no file name specified in call to SendFile or MailFile
#-11 = file not found
#-12 = not available in singlepart mode
#-13 = site specific error
#-14 = connection not established. Did you mean MailFile instead of SendFile?
#-15 = no SMTP server specified
#-16 = no From: address specified
#-17 = authentication protocol not accepted by the server
#-18 = login not accepted
#-19 = authentication protocol is not implemented
my @recipients = qw(ich@xyz.de);
sub send_mail {
my $msg = "msg\n";
my $topic = "topic";
foreach my $recipient (@recipients) {
my $sender = new Mail::Sender{ from => 'hallo@xyz.de',
to => $recipient,
smtp => 'abc.de.xyz',
subject => $topic
} or die $Mail::Sender::Error;
return $sender->MailMsg({ msg => $msg }) or die $Mail::Sender::Error;
}
}
print send_mail();
weiss jemand, ob ich da noch was spezielles machen muss, damit es unter Windows läuft?
Danke im voraus\n\n
<!--EDIT|vayu|1157013501-->