The Ultimate SMTP Configuration Guide

Learn the fundamentals of configuring your applications to send email securely.

Whenever you need your website, WordPress blog, or custom software to send emails (like password resets or receipts), you must follow an SMTP Configuration Guide. Instead of sending emails directly from your web server, which often results in spam placement, you route them through a dedicated email provider using SMTP.

1
Find Your SMTP Credentials
To configure any email client or application, you need four specific pieces of information from your email hosting provider (Google Workspace, Office 365, SendGrid, etc.):
  • SMTP Server Hostname: The address of the server (e.g., smtp.gmail.com).
  • SMTP Port: The network port used for connection (usually 587 or 465).
  • Username: Typically your full email address.
  • Password: Your email password or a generated App Password.
2
Input the Details into your App
Whether you are using a WordPress plugin like WP Mail SMTP, or coding in Node.js/C#, you will input these exact credentials into the SMTP configuration settings of your tool.

Choosing the Right Port

Understanding Ports 587, 465, and 25 for encrypted transmission.

Port 25 Warning: Port 25 is the original, unencrypted SMTP port. Almost all modern ISPs and cloud providers block outgoing connections on Port 25 to prevent spam. Do not use it for client submissions.
Port 587 (Recommended)

Port 587 is the modern standard for SMTP email submission. It uses STARTTLS encryption. This means the connection starts as plain text, but immediately upgrades to a secure TLS connection before any passwords are sent.

Always select "TLS" or "STARTTLS" when using port 587.

Port 465 (Implicit SSL)

Port 465 establishes an Implicit SSL connection. The connection is encrypted from the very first byte before any communication happens. It is highly secure and widely supported.

Always select "SSL" when using port 465.

Alternative Port (2525): If you find that both 587 and 465 are blocked by your corporate network or hosting provider, many SMTP services (like SendGrid or Mailgun) support port 2525 as a secure, non-standard alternative.

Authentication & App Passwords

Why your standard email password might be rejected by the SMTP server.

1
The 2FA Problem
If your email account (like Gmail or Microsoft 365) has Two-Factor Authentication (2FA) enabled, you cannot use your regular password for SMTP configuration. SMTP does not support the pop-up prompts required for SMS or Authenticator app codes. It will simply reject the connection as "Authentication Failed".
2
Creating an App Password
To solve this, you must generate an App Password. This is a unique, 16-character password generated by your email provider specifically for your application.
  • Google: Manage your Google Account > Security > 2-Step Verification > App Passwords. Generate a password for "Mail".
  • Microsoft: Security info page > Add sign-in method > App password.
3
Use the App Password in your Config
Copy the generated 16-character string (without spaces) and paste it into the "Password" field of your application's SMTP settings. The username remains your full email address.

Live SMTP Connection Tester

Having trouble connecting? Use our live tool to open a real TCP connection to your SMTP server and verify that the port is open and responding.

Response Time
--
Target Port
--
Protocol State
--

Live Server Greeting (Raw Response):

Diagnostic Summary

Comprehensive SMTP Configuration Guide

Stop struggling with email setups. Follow our definitive SMTP Configuration Guide to connect WordPress, web apps, and scripts to your mail server reliably.

Secure Port Selection

A crucial part of any SMTP Configuration Guide is knowing which port to use. We explain the exact differences between Port 587 (STARTTLS) and Port 465 (SSL).

Bypass 2FA Authentication

Learn how to generate App Passwords. Our SMTP Configuration Guide shows you how to securely authenticate with Google and Microsoft without triggering 2FA blocks.

Live Port Diagnostics

Reading an SMTP Configuration Guide is great, but testing is better. Use our live TCP tool to verify your server is reachable and not blocked by a firewall.

Guaranteed App Delivery

Routing emails through PHP or WordPress directly causes spam issues. Follow this SMTP Configuration Guide to route mail through authenticated provider IPs.

Read Server Greetings

Our integrated tool captures the live 220 banner from your host, providing the final validation step required in a professional SMTP Configuration Guide.