7 my $netdns = eval 'use Net::DNS';
8 if($netdns) { use Net
::DNS
};
10 my $from='harvie@harvie.cz';
11 my $rcpt='harvie@email.cz';
13 my $mesg='H3ll0 Dolly!';
15 my @rcpts = split('@', $rcpt);
21 foreach(mx
($rcpts[1])) {
22 if($_->preference > $preference) {
23 $preference = $_->preference;
28 #get mx without Net::DNS
29 foreach(split("\n", qx{ bash
-c
"host -t mx email.cz | cut -d ' ' -f 7" })) {
36 my $smtp = Net
::SMTP
->new('mx50.seznam.cz', ( debug
=> 1));
42 $smtp->datasend("Subject: $subj\n");
43 $smtp->datasend("From: $from\n");
44 $smtp->datasend("To: $rcpt\n");
45 $smtp->datasend("\n");
46 $smtp->datasend("$mesg\n");
This page took 0.288696 seconds and 4 git commands to generate.