Documentation

✉️ Email Delivery

Documentation, reference material and tutorials for CRM-NG SMTP Email: setup guides for every mail service, troubleshooting, and one article per error message.

Error: Connection refused

Updated

By Duane GarnerChief Executive Officer (CEO)
Summarize: Claude ChatGPT View Markdown
On this page

The mail server's address answered but refused the connection on that port. Check the port and host, then ask your host about firewalls.

Shown by the Other SMTP and Zoho Mail mailers (and the backup SMTP transport)

The test result or the error log shows a message such as Connection refused (111) or Failed to connect to server: Connection refused.

This article is for site owners sending through an SMTP server who see the connection actively refused.

What this error means

Your web server found the mail server's address and knocked on the port you chose. Something at that address answered straight away with "no". That is different from a timeout, where nothing answers at all. A refusal usually means nothing is listening on that port, or a firewall is set to reject the connection rather than ignore it.

Common causes

  • The wrong SMTP Port for this server, for example 465 on a server that only offers 587.
  • SMTP Host points to a machine that is not a mail server, such as your website's own address.
  • Your web host redirects or rejects outgoing mail ports on purpose. Some hosts allow only their own mail server on port 25 or 587.
  • A firewall on your web server (for example a security plugin for the server, or the host's firewall) blocks outgoing SMTP.
  • The mail server's service is stopped or restarting.
  • localhost was entered as the host on a server that runs no mail service.

How to fix

  1. Confirm the port and host

    Check your mail provider's documentation or admin console for the SMTP server name and the ports it accepts.

  2. Correct CRM-NG SMTP

    Go to CRM-NG SMTP → Settings → General. Set SMTP Host, SMTP Port and Encryption: 465 with SSL, or 587 with TLS. Save.

  3. Test the port from the server

    If you have SSH access, run nc -vz smtp.example.com 587 (with your host and port). "Refused" here confirms the block is outside CRM-NG SMTP.

  4. Ask your web host

    Ask whether outbound connections to that host and port are allowed, or whether they require you to use their own relay. Share the error from CRM-NG SMTP → Tools → Debug Events.

  5. Send a test

    Go to CRM-NG SMTP → Tools → Email Test, fill in Send To and press Send Email.

Verify it worked

The test page shows "Test email sent successfully! Check your inbox to confirm delivery."

Notes

  • If the host blocks mail ports and will not open them, use an API mailer instead. API mailers use HTTPS on port 443, which is almost never blocked.
  • Mail providers sometimes block an IP that made many failed logins. If the refusal started after several failed tests, wait and try again later, or ask the provider.
Go to Top