Thread Net::SMTP::Server auf Windows 7 (70 answers)
Opened by bianca at 2016-02-29 15:58

bianca
 2016-03-15 09:06
#184158 #184158
User since
2009-09-13
6977 Artikel
BenutzerIn

user image
Ja, stimmt, hab ich vergessen.

Der Client ist Outlook Express.

Der Server:
Code (perl): (dl )
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
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
require Data::Dumper; Data::Dumper->import(qw(Dumper));
local $Data::Dumper::Purity;
$Data::Dumper::Purity = 1;
local $Data::Dumper::Useqq;
$Data::Dumper::Useqq = 1;
local $Data::Dumper::Sortkeys;
$Data::Dumper::Sortkeys = sub {
    my ($hash) = @_;
    return [(sort {lc $a cmp lc $b} keys %$hash)];
};
use 5.010;

require Net::SMTP::Server;
require Net::SMTP::Server::Client;
my $server = new Net::SMTP::Server('localhost',25);
while(my $conn = $server->accept()) {
    my $client = new Net::SMTP::Server::Client($conn) or die("Unable to handle client connection: $!\n");
    $client->process || next;
    say Dumper($client);
    say Dumper($conn);
}
10 print "Hallo"
20 goto 10

View full thread Net::SMTP::Server auf Windows 7