You probably have SMTP_BLOCK enabled in CSF. This blocks outgoing access to port 25 / 26. Since by default you are using the domain or server hostname to connect, it will be blocked. You need to change the hostname for connecting to SMTP to 'localhost'