I am trying to use Perl to send email via SMTP server, however I cannot receive the mail.
=================
socket(SOCK, AF_INET, SOCK_STREAM, $proto) or return "Socket operation failed : Reason $!";
print "test";
connect(SOCK, pack('S n a4 x8', AF_INET(), $port, $smtpaddr)) or return "Connection failed : Reason $!";
=================
I can create socket(I can get "test" output), but I cannot connect that server(it looks get refused), the smtp server name is correct and allow me to use it.
the port and smtpaddr is also correct, is it related to platform?
What could be the reason?
=================
socket(SOCK, AF_INET, SOCK_STREAM, $proto) or return "Socket operation failed : Reason $!";
print "test";
connect(SOCK, pack('S n a4 x8', AF_INET(), $port, $smtpaddr)) or return "Connection failed : Reason $!";
=================
I can create socket(I can get "test" output), but I cannot connect that server(it looks get refused), the smtp server name is correct and allow me to use it.
the port and smtpaddr is also correct, is it related to platform?
What could be the reason?