#!/usr/bin/perl -wT
use IO::Socket::INET;
$mailserver = "smtp.mail.ru";
print "Content-type: text/html\\n\\n";
$sock = IO::Socket::INET->new(PeerAddr => "$mailserver:smtp(25)", Timeout => \'4\');
sysread $sock,$answer_data,255;
print "1: $answer_data
";
syswrite $sock, "helo $mailserver\\r\\n";
sysread $sock,$answer_data,255;
print "2: $answer_data
";
syswrite $sock, "MAIL FROM: <09h\\@mail.ru> AUTH=09h\\@mail.ru\\r\\n";
sysread $sock,$answer_data,255;
print "3: $answer_data
";
syswrite $sock, "RCPT TO:\\r\\n";
sysread $sock,$answer_data,255;
print "4: $answer_data
";
syswrite $sock, "DATA\\r\\n";
sysread $sock,$answer_data,255;
print "5: $answer_data
";
syswrite $sock, "Blah blah blah...\\r\\n";
syswrite $sock, "...etc. etc. etc.\\r\\n";
syswrite $sock, ".\\r\\n";
sysread $sock,$answer_data,255;
print "6: $answer_data
";
syswrite $sock, "QUIT\\r\\n";
sysread $sock,$answer_data,255;
print "7: $answer_data
";
close $sock;
чтото я с AUTH не пойму ничего...
отвечает
1: 220 mail.ru ESMTP Thu, 01 Jun 2006 20:43:43 +0400
2: 250 mx6.mail.ru Hello smtp.mail.ru [212.96.102.250]
3: 250 OK
4: 250 Accepted
5: 354 Enter message, ending with "." on a line by itself
6: 550 Message was not accepted -- invalid mailbox. Local mailbox AUTH=09h@mail.ru is unavailable: user not found
7: 221 mx6.mail.ru closing connection
бывают вообще smtp сервера без авторизации? как сделать эту авторизацию? что неправильно сделал?