SMTP works only inside the box
I just set up a sendmail in my CentOS 5.3 linux box.
And I am having problem accessing SMTP from the outside network.
When I try to telnet to SMTP inside linux console, it's okay.
Basically I used the same command in the Linux console and Windows Command Prompt.
telnet mail.example.com 25
I can ping to the mail.example.com so it's not DNS or ip problem.
I used iptables command to see if I set up firewalls but i didn't.
telnet mail.hoopycat.com 25
I know that one's up and reachable.
You are right!!
I tried your code and it didn't work. I guess I need to use ISP's SMTP.