This happens quite often with new users or admins who are not familiar with mail setups. Postfix (/etc/postfix/main.cf
inet_interfaces = localhost
Change to
inet_interfaces = all
Sendmail (/etc/mail/sendmail.mc
DAEMON_OPTIONS('Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
Change to
DAEMON_OPTIONS('Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
Services need to be notified of the changes
sendmail service restart
or
service postfix reload