SMTP port configuration: Which port should you use
For most outgoing email, configure SMTP port 587 with STARTTLS. Use port 465 when the server expects implicit TLS, and consider port 2525 as a fallback when standard submission ports are blocked. This SMTP port configuration depends on matching the port to the encryption mode the server supports.
Choosing an SMTP port can be confusing because the port number and TLS setting must work together. A failed connection does not always mean the server is unavailable: the network may block the selected port, or the email client may be using the wrong TLS mode.
This guide explains the roles of ports 587, 465, 2525, and 25, including how message submission differs from server-to-server relay. It also covers common signs of blocked ports and TLS mismatches, so you can identify which setting to adjust. You’ll learn when a fallback port may help and how authentication relates to sending email.
Key Takeaways
- Match the submission port to the server’s expected encryption mode to avoid TLS negotiation errors.
- Distinguish message submission from server-to-server relay when selecting a port for an email client, website, or automated system.
- Use authentication failure messages to identify whether credentials or relay permissions are preventing delivery.
- When comparing server options, review their technical specifications to find a configuration that fits your sending requirements.
Table of Contents
What SMTP port should be used?
For authenticated message submission, use port 587 with STARTTLS. In an email client, select STARTTLS or SSL/TLS to match the server’s required connection mode, then provide the account credentials after encryption is established.
Authenticated Message Submission
Authenticated message submission verifies a sender’s credentials before an SMTP server accepts outgoing email. Port 587 is the default port for submitting messages from an email client or outgoing server. Authentication helps separate authorized sending from server-to-server relay. For example, a mailbox user submits a message through port 587 using the account credentials configured for that mailbox.
TLS Protection for SMTP
TLS encrypts an SMTP connection, helping protect messages from interception or alteration in transit. To use STARTTLS, select it in the outgoing server settings for a server that supports it. For SSL/TLS, choose the matching encrypted connection mode. STARTTLS upgrades an initially unencrypted connection; implicit TLS starts with encryption already active.
Port selection and security settings work together. A port number alone doesn’t encrypt SMTP traffic. For example, port 587 commonly uses STARTTLS, while port 465 uses implicit TLS. If the client starts implicit TLS against a server expecting STARTTLS, the connection modes won’t match. Use the mode specified for the SMTP server.
Authentication methods establish who may submit a message. SMTP authentication can use a password, CRAM-MD5, or KERBEROS. The client and server must support a compatible method. An account password entered into the outgoing server settings is a common example. Authentication credentials identify the sender; TLS protects their transmission when the connection is encrypted.
Use the username and password associated with the sending account. An incoming-mail password may not work for SMTP if the provider separates account access from sending permissions. The server’s accepted authentication method matters, too. If the server rejects a password, changing ports will not fix the authentication failure. Check the username and method against the server’s requirements.
SMTP authentication is required on the main SMTP ports except port 25. Port 25 primarily supports relay between mail servers, rather than routine authenticated submission from a user’s device. Therefore, a desktop client, website, or application that submits messages should use the server’s submission settings and authentication. This distinction helps prevent relay errors and avoids treating port 25 as a substitute for account-based sending.
For a secure setup, match three settings: the server’s SMTP port, the encryption mode, and the authentication method. On port 587, select STARTTLS when the server supports it, then enter the required credentials. If the server requires SSL/TLS, select that mode instead. These settings establish an encrypted connection before credentials and message data are transmitted.
Which SMTP ports should you actually use for sending emails?
Use port 587 for authenticated email submission from a client, website, or application. Reserve port 25 mainly for server-to-server delivery; internet service providers frequently block it, so it isn’t recommended for general sending.
SMTP Settings Across Sending Systems
SMTP settings connect a sending system to a mail server for message submission. The same principle applies to email clients, websites, and automated applications, but each needs the correct server address, port, encryption mode, and authentication details. For example, configure a website’s mail function with the SMTP server’s submission settings instead of assuming the hosting server can relay messages directly.
In an email client, SMTP settings control messages sent from a user’s account. A website uses them for notifications, while an automated system uses them for scheduled or system-generated emails. A consistent SMTP port configuration helps each system submit messages through the intended server. Match credentials and encryption settings to that server’s requirements.
Port 25 for Server Delivery
Port 25 primarily relays email between mail servers, carrying messages toward the recipient’s mail server. It usually works for SMTP relay, but internet service providers frequently block outbound connections on this port. The restriction can prevent a website or client from connecting to an external mail server, even when its server name and credentials are correct.
Use port 25 when a mail server is performing server-to-server delivery, not as the default for an email client or application. If an application’s connection fails on port 25, the block may occur in the network or hosting environment. A submission port such as 587 is generally the appropriate choice for sending through an authenticated mail server.
Port 587 for Secure Submission
Port 587 is the default port for submitting email from an email client or outgoing server to a mail server. It is commonly used with STARTTLS and SMTP authentication. For a client, website, or automation task, select port 587 when submitting outgoing messages through a provider’s mail server.
Choose the port according to the connection’s role. Submission means a client hands an outgoing message to a mail server; relay means one mail server transfers email to another. Use port 587 for authenticated submission, then configure the matching encryption mode and credentials. Port 25 is generally for relay and may be blocked on outbound connections.
For example, a website sending account notifications should submit them to its configured mail server using port 587, rather than attempting direct delivery over port 25. An automated application follows the same distinction. If it sends through a mail server, use that server’s submission settings. This keeps message submission separate from onward delivery to the recipient’s server.
Port 2525 as an alternative submission port
Port 2525 can serve as an alternative for SMTP message submission when standard ports are blocked. Some email providers offer it as a fallback when sending through standard submission ports is unavailable. It is not recognized as a standard SMTP port by the IETF or IANA, so support depends on the provider and server configuration.
Use port 2525 only when the SMTP server supports it. For example, if a connection to port 587 is blocked, a provider that offers port 2525 may allow the mail client to submit messages through that alternative. Changing the port cannot make a server accept a connection on a port it does not support. The server must be configured to listen for mail submission there.
Keep the connection settings aligned. When configuring port 2525, use the server name, authentication method, and encryption mode specified for that port. A different port does not by itself determine whether the connection uses STARTTLS or implicit TLS. If the client expects one mode and the server uses another, the connection can fail even when port 2525 is reachable.
Port 2525 is a fallback, not a universal replacement for port 587. First identify whether the problem is a blocked connection or a mismatch in the client’s settings. A timeout when connecting to port 587 points to a connection problem; a TLS error can indicate incompatible encryption settings. Switching to port 2525 is useful only when the server provides that option and the correct settings are applied.
For an email client, enter the server’s SMTP hostname and port 2525 in the outgoing mail settings. Then configure the required authentication and encryption options. For a website or automated application, apply the same server-specific settings in its SMTP configuration. These systems submit messages to a mail server; the server then handles onward delivery.
Because 2525 is not an IETF- or IANA-recognized standard SMTP port, implementations can vary. Treat the provider’s port-specific settings as a matched set rather than copying only the number. For example, an application may reach port 2525 but still fail if its credentials are incorrect or its TLS mode does not match. Use port 587 when it is available and configured for submission; use 2525 when the server supports it as a fallback.

Port 465 and implicit TLS
Port 465 is used for SMTP submission with implicit TLS, which encrypts the connection from its start. The Internet Assigned Numbers Authority first registered port 465 as SMTPS in 1997. Implicit TLS is one way to encrypt an email submission connection from the outset. This setting suits a sender whose email service specifies implicit TLS.
Implicit TLS differs from STARTTLS in how encryption begins. With implicit TLS, the client establishes an encrypted connection immediately. STARTTLS begins with an SMTP connection and then upgrades it to TLS. These modes are not interchangeable in a mail client’s settings. Selecting port 465 with STARTTLS, for example, can cause a connection failure because the client and server expect different opening exchanges.
Set the outgoing server’s port to 465 and choose the SSL/TLS or implicit TLS option when the service provider specifies that combination. Enter the SMTP hostname and authentication credentials in the same outgoing mail settings. A website or automated sender also needs the matching server address, port, and encryption mode. The port number alone does not determine which TLS mode the server expects.
RFC 8314 recommended implementing SMTPS through implicit TLS on default port 465 in 2018. At the same time, port 465 is described as a legacy secure port with limited support and as not RFC-compliant for current SMTP use. This makes the provider’s configuration important: use port 465 when its documented submission service supports implicit TLS, rather than assuming every SMTP server accepts it.
Several service providers retain port 465 for backward compatibility. For a sender moving an email client between providers, the previous 465 setting may not match the new service. Compare the new server’s specified port and TLS mode, then update both settings together. If the connection fails immediately, check whether the client is initiating implicit TLS instead of attempting a STARTTLS upgrade.
Authentication and encryption serve different functions on port 465. SMTP authentication identifies the account permitted to submit messages, while TLS encrypts the connection between the sender and mail server. Configure the required credentials after selecting implicit TLS. A password rejection points to an authentication issue; a TLS negotiation error points to a mismatch in encryption settings or server expectations.
Port 465 can be the correct choice when the email service requires implicit TLS. For a service specifying STARTTLS, use its designated submission configuration instead. Treat the port, security setting, server name, and authentication method as one set of SMTP parameters. Changing only the port can leave the client using an incompatible protocol, even when the server is reachable.
Troubleshooting blocked SMTP ports and TLS errors
SMTP port failures can come from a blocked network connection or mismatched encryption settings. SMTP transfers messages; IMAP and POP3 retrieve them. Separate these functions before changing a mail client’s settings, since an incoming-mail port cannot replace an outgoing SMTP port.
Port 465 starts an encrypted connection using implicit TLS. Port 587 is used for message submission with STARTTLS, which upgrades the connection to TLS. If a client selects port 465 but expects STARTTLS, its opening exchange won’t match the server’s. Match both the port and encryption mode to the email provider’s SMTP settings.
A connection timeout on port 25 or 587 can indicate that a firewall, hosting network, or internet service provider blocks the selected port. SMTP error 421 means the client cannot connect to the server, potentially because a firewall or ISP blocks that port. If port 25 is blocked, it is generally unsuitable for ordinary sending anyway; use a supported submission port instead.
For a TLS error, compare the client’s encryption choice with the SMTP server’s expected mode. On port 587, select STARTTLS when that is the server’s configuration. On port 465, select implicit TLS. A port change alone won’t fix incorrect credentials or an incompatible TLS mode. Check the server name, port, encryption setting, and authentication details as separate settings.
Keep incoming-mail ports distinct from SMTP ports. Unencrypted IMAP uses port 143, while encrypted IMAP uses port 993. Unencrypted POP3 uses port 110, while encrypted POP3 uses port 995. For example, a client receiving messages through IMAP port 993 still needs separate SMTP settings to send them.
Common SMTP ports serve different roles: port 25 primarily relays email between mail servers, port 587 handles authenticated submission, and port 465 supports submission with implicit TLS. Some providers also offer port 2525 as a fallback when standard ports are blocked. Identify whether the symptom is a timeout, authentication failure, or TLS negotiation error before changing settings.
If the configured port is reachable but message transmission still fails, review the server’s specifications and the client’s matching settings. Review SMTP server specifications to compare technical details for sending requirements.
Xelin: SMTP server
Xelin’s online marketplace lets you browse SMTP server listings and review their technical specifications. It is a useful next step once you know which port and encryption mode your email system requires and are comparing servers for outbound sending.
Compare each listing’s specifications with your sending requirements, including its supported connection details. This helps you assess whether a server suits your intended mail submission configuration. Xelin provides server listings and technical resources, while you configure your own email client, website, or application.
Visit Xelin to compare SMTP server listings and review their technical specifications.
Put the Selected Settings Into Practice
Include your SMTP port configuration in your system’s operational record. Document the server name, port, encryption mode, and authentication method together. Use the same record for each relevant sending application, and update it when credentials or network policies change. This gives administrators a clear reference when reviewing changes or diagnosing delivery issues.
If you need an SMTP server for email delivery, browse Xelin’s listings and review their technical specifications. Compare those details with your documented requirements to assess whether a listing fits your sending workflow. Choose based on your system’s needs and the settings you have identified.
Contact Xelin to discuss email delivery. A clearly documented configuration gives your team a practical foundation for managing email transmission.
Frequently Asked Questions
How do SMTP ports work behind the scenes?
An SMTP port directs a sending application to a particular service on a mail server. The client connects to the server name and port, then exchanges SMTP commands and message data. The server can authenticate the sender, accept the message, and route it toward the recipient’s mail server. For example, a desktop email client uses its configured SMTP endpoint when you select Send.
How does SMTP Secure (SMTPS) work?
SMTPS uses TLS to encrypt SMTP traffic between a sender and a mail server, and between mail servers during transmission. This protects data on those connections but does not provide end-to-end encryption: the receiving server handles the message before encrypting it for the next connection. PGP or S/MIME can be used to protect message content end to end.
When is port 2525 used?
Port 2525 is used for SMTP submission when a provider supports it as an alternative, often because standard ports are blocked. For example, an application that cannot connect through port 587 may use port 2525 if its SMTP server accepts that port. It is not recognized as a standard SMTP port by the IETF or IANA, so it is a server-specific fallback, not a universal setting.
What SMTP ports are commonly used: 25, 465, 587, and 2525?
Port 25 is primarily for mail relay between servers; port 587 is the common choice for authenticated message submission. Port 465 uses implicit TLS, which encrypts the connection immediately. Port 2525 is an alternative submission port supported by some providers. These ports aren’t interchangeable: the right choice depends on whether the system relays or submits mail and which encryption mode the server expects.
Which SMTP port should be used for mail submission by email clients?
Use port 587 for email-client submission when the mail server supports STARTTLS. This setting is intended for a client handing an outgoing message to a mail server, rather than for server-to-server relay. If the provider specifies implicit TLS, use port 465 with that mode instead. For example, configuring a laptop’s outgoing account requires matching the port and encryption option to the server’s submission settings.
How do I configure SMTP host, port, username, and password?
Enter the SMTP server name provided for the account, then set the submission port and matching encryption mode. Add the account’s SMTP username and password in the outgoing mail settings. For example, a website sending order notices needs these same details in its mail configuration. Even with the correct server, a wrong port, TLS option, or credential can prevent message submission.
How can I troubleshoot SMTP connection and authentication errors?
Separate connection failures from credential failures before changing settings. SMTP error 421 means the client cannot connect, potentially because a firewall or ISP blocks the selected port. Error 535 indicates authentication failure, commonly from an incorrect username or password. Error 554 indicates relay access is denied. For TLS errors, compare the client’s encryption mode with the mode expected on the configured port.
How do firewall and cloud hosting providers restrict SMTP ports?
Firewalls and hosting networks can block outbound connections to SMTP ports through network egress rules. A blocked connection may time out or produce SMTP error 421; port 25 is frequently blocked by internet service providers and is not recommended for general sending. If an application cannot connect, use an allowed submission port supported by its SMTP server and ensure the client’s encryption settings match.