Zen Cart simply uses the host name and port to make a connection, and then uses the username and password to log in.
If your webserver can't talk to your email server using that information, then something on the server is blocking that communication.