Deliverability

Salesforge "Connection Timed Out": right SMTP and IMAP ports

"Connection Timed Out" when connecting a mailbox usually means the tool could not reach your mail server on that host and port. Use SMTP port 465 (SSL) or 587 (STARTTLS) and IMAP port 993 (SSL), confirm the hostname, check the firewall, and stop retrying a wrong password.

Sohail HussainSohail Hussain9 min read

Short answer

  • Set SMTP to port 465 with SSL/TLS (or 587 with STARTTLS) and IMAP to port 993 with SSL/TLS, using the exact server hostnames from your mail host.
  • If the ports are right, check for a firewall or IP block and too many simultaneous connections, and stop retrying a wrong password.
  • Salesforge's help article describes an IP block after 10 failed logins in 10 minutes, lasting 30 minutes, so a lockout can look like a timeout.

You add a mailbox to Salesforge or a similar cold email tool, and the connection fails with this:

Connection Timed Out

It means the tool tried to reach your mail server on the host and port you entered, and no complete answer came back before the wait ran out. Nothing was rejected; nothing answered. That distinction decides where you look.

Why it happens

Causes are listed roughly from most to least common.

  1. Wrong port or encryption mode. The port is closed on that server, or the port and the SSL/STARTTLS setting do not match.
  2. Wrong hostname. The tool is calling a machine that does not run a mail service, often the website's server.
  3. A firewall or security rule dropping the tool's traffic. Hosting firewalls, geo restrictions and IP allowlists do this silently.
  4. Too many simultaneous connections. Mail servers cap concurrent sessions per account or per IP, and extra ones queue until they time out.
  5. A login lockout. Salesforge's help article says repeated failed logins trigger an IP block: 10 failed logins in 10 minutes blocks for 30 minutes. Other tools and hosts use their own thresholds.

A wrong password on its own does not time out. It returns an authentication error (SMTP 535, or IMAP NO with AUTHENTICATIONFAILED). The lockout case is the exception, because the block turns later attempts into silence.

Step-by-step fixes

1. Match the port to the encryption mode

Pick one pairing and make sure both fields agree.

ProtocolPortEncryption settingUse it?
SMTP (sending)465SSL/TLS (implicit)Yes
SMTP (sending)587STARTTLSYes, if 465 fails
SMTP25Usually noneNo; often blocked
IMAP (reading replies)993SSL/TLS (implicit)Yes
IMAP143STARTTLSOnly if your host requires it

The classic mistake is port 465 with STARTTLS selected, or 587 with SSL selected. The server waits for one kind of handshake, the client starts the other, and both wait until the timeout. The IETF's RFC 8314 describes both options for mail submission: clients and servers should implement both STARTTLS on port 587 and Implicit TLS on port 465, and it names port 993 as the default for IMAP over implicit TLS. You can read it at the RFC 8314 page. If one pairing fails, try the other before changing anything else.

2. Use the host's real server names

Use the hostname your mail provider publishes, not necessarily your website's domain. mail.example.com is common, but many providers use names such as smtp.provider.net and imap.provider.net. Look for "manual configuration" or "client settings" in your host's email setup page. SMTP and IMAP often have different hostnames, so check both.

3. Test the connection from a terminal

Run these before touching the tool again:

openssl s_client -connect smtp.example.com:465
openssl s_client -starttls smtp -connect smtp.example.com:587
openssl s_client -connect imap.example.com:993

A certificate dump followed by a greeting (220 for SMTP, * OK for IMAP) means the port is reachable. A hang means the path is blocked, or the host or port is wrong. If it works from your machine but the tool still times out, the block is likely between the tool's servers and yours.

Test both protocols

SMTP can connect while IMAP times out, or the reverse. If the tool reports one timeout, run the terminal test for both sending and reading before you change settings.

4. Check firewalls, geo rules and provider settings

  1. Ask your host whether ports 465, 587 and 993 are open to outside mail clients on this account.
  2. Ask whether the account or server restricts logins by country, data center or IP allowlist. Cold email tools connect from cloud servers, which some hosts treat as suspicious.
  3. Ask the tool's support which IP addresses it connects from, and give them to your host if an allowlist exists.
  4. For Google Workspace, a password login over SMTP/IMAP generally needs an app password, and IMAP must be enabled. For Microsoft 365, SMTP AUTH can be disabled for the tenant or mailbox, and basic authentication is often off. If the tool offers Google or Microsoft sign-in (OAuth), use that instead of raw SMTP.
  5. Remember that your own ISP may block outbound port 25. That fails your terminal test without affecting the tool's connection.

5. Reduce simultaneous connections

Cheap shared hosting often caps concurrent sessions low. If you connect many mailboxes at once, or have a phone, a desktop app and the tool all logged into the same mailbox, new connections can queue and time out.

  1. Connect mailboxes one at a time, or a few at a time.
  2. Close other mail clients on the mailbox while you connect.
  3. If the tool lets you lower simultaneous connections or raise the timeout, do both. Slow hosts need longer waits, and fewer parallel sessions keeps you under the cap.
  4. If it keeps happening, ask the host for its per-account and per-IP connection limits.

6. Rule out a login lockout

If you mistyped the password several times, fixed it, and still get a timeout, a block is the likely cause.

  1. Stop retrying.
  2. Wait out the block (30 minutes in Salesforge's case), or ask your host to unblock the IP.
  3. Log in through webmail to confirm the credentials work.
  4. Reconnect once, with the correct password, host and port.

Salesforge's own guidance on disconnected mailboxes adds a related point: if the disconnection comes from incorrect credentials or outdated settings, such as a changed password, you need to re-import the mailbox. A temporary interruption can be fixed with the Reconnect button, per its reconnect help article.

Do not keep hammering the login

Each failed attempt counts toward a block, and a block hides your fix behind another timeout. Change one thing, then try once.

How to tell which cause you have

What you seeLikely causeFix
Terminal test hangs on every portWrong hostname, or host blocks youRe-check the hostname; ask the host
465 hangs, 587 works (or the reverse)Port and encryption mismatchUse the pairing that works
SMTP connects, IMAP times outIMAP host or port 993 wrong, or IMAP disabledFix IMAP host; enable IMAP
Works from your machine, fails in the toolFirewall or geo rule on the serverAllowlist the tool's IPs
Worked, then timed out after failed triesLogin lockoutWait, then retry once
Fails only when connecting many mailboxesConnection limitConnect in small batches

Checklist before you try again

  • SMTP is 465 with SSL/TLS, or 587 with STARTTLS; never mixed.
  • IMAP is 993 with SSL/TLS.
  • Hostnames come from your mail provider's setup page.
  • The password works in webmail, and an app password is used where required.
  • IMAP and SMTP AUTH are enabled on the account.
  • No other client is holding sessions on the mailbox.
  • At least 30 minutes have passed since the last failed logins.

If you connect the mailbox in Mailneo instead

Mailneo connects Gmail, Google Workspace, Outlook and Microsoft 365 by OAuth, so for those you skip ports and passwords entirely. SMTP/IMAP accounts (custom servers, Amazon SES, SendGrid, Mailgun, Brevo, Postmark, Resend, smtp.com) follow the port rules above. Mailneo offers IMAP server auto-discovery, bulk import of many accounts, and a connection test on each account; the email accounts documentation walks through it. It cannot open ports on your host or change your firewall, so those fixes stay with you or your provider. Once a mailbox is connected, Mailneo checks your domain's SPF, DKIM and DMARC records and common blacklists, and you can set those up with the SPF generator or the guide to SPF, DKIM and DMARC. New accounts get a 3-day free trial at mailneo.co.

If nothing works

Contact your mail host first (the company that runs the mailbox), then the tool's support. Include:

  • The exact hostname, port and encryption mode you tried.
  • The error text and the time, with timezone.
  • The output of the openssl s_client tests.
  • Whether you entered a wrong password in the last hour.
  • What you already changed.
Subject: SMTP/IMAP connection timing out from an outside mail tool

Hello,

I am connecting the mailbox {user@example.com} to a cold email tool and get "Connection Timed Out".

Settings tried:
- SMTP: {smtp.example.com}, port 465, SSL/TLS (also tried 587, STARTTLS)
- IMAP: {imap.example.com}, port 993, SSL/TLS
- Time of last attempt: {date, time, timezone}

The openssl s_client test from my machine {succeeds / hangs}.

Please confirm:
1. Is the sending IP {tool IP, if known} blocked or rate limited?
2. Are ports 465, 587 and 993 open to outside clients on this account?
3. What are the per-account and per-IP connection limits?

Thank you.

Common questions

Should I use port 465 or 587 for SMTP?

Either works if the server supports it and the encryption setting matches. RFC 8314 says there is no significant security difference between STARTTLS on 587 and implicit TLS on 465 when both sides require TLS, so use whichever your host documents.

Does Connection Timed Out mean my password is wrong?

Usually not. A wrong password normally returns an explicit authentication error. The exception is repeated failed attempts that trigger an IP block, after which everything times out.

Can I use port 25 to connect a mailbox?

I'd skip it. Port 25 is for server-to-server delivery, and many hosts and ISPs block it for clients. Use 465 or 587.

How long does a lockout last?

It depends on the host or tool. Salesforge's help article gives 30 minutes after 10 failed logins in 10 minutes. For any other provider, ask them.

deliverabilitysalesforgeerror-codes
Share this article
Sohail Hussain

Sohail Hussain

Founder & CEO at Mailneo

Building Mailneo — AI-powered email marketing for growing businesses.

Related Articles

Deliverability

0x800ccc0e: Outlook Unable to Connect to SMTP Server, Fixed

Outlook error 0x800ccc0e means the app could not open a connection to your outgoing (SMTP) server. Usually the port, encryption setting or password is wrong, or antivirus, a firewall or your ISP is blocking it. Set port 587 with STARTTLS, turn on SMTP authentication, and test again.

Sohail Hussain|10 min read
Deliverability

SocketLabs "421 4.5.1 Too many errors" blacklist: how to fix it

`421 4.5.1 Too many errors, you have been temporarily blacklisted` means a SocketLabs server saw repeated auth or bad-address errors from your IP and paused it. Stop whatever is retrying, fix credentials and invalid recipients, clear the queue, and wait. The block usually lifts within minutes, but returns if retries resume.

Sohail Hussain|9 min read
Deliverability

421-4.7.0 Gmail Has Detected This Message Is Suspicious: Fix

The 421-4.7.0 "suspicious due to the nature of the content and/or the links" error means Gmail's content filter rejected your message after DATA, not an authentication check. Remove click tracking or move it to your own domain, drop URL shorteners, check link reputation, then retest with a plain message.

Sohail Hussain|10 min read
Deliverability

421 4.7.0 IP not in whitelist for RCPT domain: what it means

The error 421 4.7.0 IP not in whitelist for RCPT domain means the recipient's mail gateway, usually Mimecast in reports, only accepts connections from approved IPs, and the Google sending IP isn't on that list. The fix is on the recipient side: their admin must allow the IPs or change the mail routing.

Sohail Hussain|9 min read

Ready to supercharge your email marketing?

Start sending smarter emails with AI-powered campaigns. No credit card required.

Get Started Free