Leser: 3
![]() |
|< 1 2 >| | ![]() |
11 Einträge, 2 Seiten |
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();
on_errors => 'die'
telnet abc.de.xyz 25
Quote220 abc.de.xyz Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Thu, 31 Aug 2006 12:34:57 +0200
QuoteVerbindungsaufbau zu abc.de.xyz...Es konnte keine Verbindung mit dem Host
hergestellt werden, auf Port 25: Verbinden fehlgeschlagen
![]() |
|< 1 2 >| | ![]() |
11 Einträge, 2 Seiten |