WordPress SMTP Port Settings: 25 vs 465 vs 587 Explained

Photo: Unsplash — free to use, no attribution required

How WordPress Handles Email by Default

If your WordPress site's contact forms, order notifications, or password resets are not reaching recipients, you are dealing with one of the most common WordPress issues. The root cause is almost always the same: your site is using PHP's default mail function instead of an authenticated SMTP connection.

Shared hosting environments compound this problem. Because thousands of websites share the same server IP, that IP often ends up on email blacklists — even if your site has never sent spam. When your legitimate emails go out from a blacklisted IP without proper authentication, they have virtually no chance of reaching the inbox.

Switching to SMTP authentication routes your emails through a dedicated, reputable mail server with proper DNS records and sender reputation. This single change resolves the majority of WordPress email delivery problems.

What You Need for Reliable Delivery

Before configuring SMTP, gather the following: your SMTP provider credentials (server address, port, username, password), access to your domain's DNS settings (for SPF and DKIM records), and WordPress admin access. If you are using a service like SendGrid, Mailgun, or Amazon SES, create your account and verify your sending domain first.

Your choice of SMTP provider matters. For low-volume WordPress sites (under 500 emails/month), Gmail SMTP or your hosting provider's mail server may suffice. For WooCommerce stores or sites with contact forms that generate more traffic, a dedicated transactional email service like SendGrid, Mailgun, Postmark, or Amazon SES provides better deliverability, analytics, and scalability.

Verify that your hosting environment does not block outgoing SMTP connections. Some shared hosts block port 25 and sometimes port 587. Check with your host or try connecting to your SMTP server on the intended port before beginning plugin configuration.

Plugin Installation and Configuration

In your WordPress dashboard, navigate to Plugins → Add New and search for your chosen SMTP plugin. Install and activate it, then go to the plugin's settings page (usually under WP Mail SMTP → Settings or Settings → FluentSMTP).

Enter your SMTP server details. The common settings are: SMTP Host (your provider's server address, e.g., smtp.gmail.com, smtp.office365.com, or smtp.sendgrid.net), SMTP Port (587 for TLS or 465 for SSL), Encryption (TLS is recommended for port 587), Authentication (enabled), Username (typically your email address or API key), and Password (your email password or API secret).

Set the "From Email" address to match the email account you are authenticating with. Mismatches between the From address and the authenticated account can cause delivery failures or emails being flagged as suspicious. The "From Name" should be your business name or website name for professional appearance.

For Google Workspace or Gmail: use smtp.gmail.com on port 587 with TLS. For Microsoft 365: use smtp.office365.com on port 587 with TLS. For SendGrid: use smtp.sendgrid.net on port 587 with your API key as the password. For Mailgun: use smtp.mailgun.org on port 587 with your Mailgun SMTP credentials.

Sending Test Emails

Systematic testing prevents surprises after deployment. Create a checklist: test basic sending, test to multiple email providers, verify authentication headers, check spam folder placement, test all automated email types (forms, notifications, transactional), and confirm that reply-to addresses work correctly.

Use a tool like MXToolbox to verify your DNS records are configured correctly. Enter your domain and check SPF, DKIM, and MX records. The tool highlights any errors or misconfigurations that could affect email delivery. Fix any issues it identifies before relying on your email configuration for production traffic.

Monitor email delivery for the first week after configuration. Most SMTP services provide delivery logs and bounce reports. Review these daily during the initial period to catch any delivery issues early. Common problems that surface during this monitoring period include SPF alignment failures, DKIM signature mismatches, and recipient server rejections.

Ongoing Best Practices

The most common WordPress SMTP issue is "Could not authenticate" errors. This typically means: incorrect credentials (double-check username and password), the account requires an app-specific password (Google and Microsoft accounts with 2FA), or the SMTP port is blocked by your hosting provider (try port 465 with SSL instead of 587 with TLS).

If emails send successfully from the test function but still do not arrive, check your DNS authentication records. Missing or incorrect SPF and DKIM records cause emails to be silently dropped or quarantined by receiving servers. Use MXToolbox or Google's CheckMX tool to verify your records.

For WooCommerce sites, verify that the SMTP plugin processes all WordPress emails — not just wp_mail calls but also WooCommerce-specific email hooks. Some custom themes or plugins bypass the standard email function. Enable email logging in your SMTP plugin to track every outgoing message and identify any that fail.

Frequently Asked Questions

Why is my WordPress site not sending emails?

The most common cause is that your site uses PHP mail() instead of authenticated SMTP. Most hosting servers have poor email configuration, causing messages to fail silently or land in spam. Installing an SMTP plugin like WP Mail SMTP or FluentSMTP and configuring it with a proper email service resolves this issue for the vast majority of WordPress sites.

Which SMTP plugin is best for WordPress?

WP Mail SMTP (by WPForms) and FluentSMTP are the two most reliable options. WP Mail SMTP has the largest user base and supports all major providers. FluentSMTP is free with no premium upsells and supports multiple SMTP connections. Both handle the core function — routing WordPress email through authenticated SMTP — equally well.

What SMTP port should I use for WordPress?

Port 587 with TLS encryption is the recommended standard for SMTP client submission. If your host blocks port 587, try port 465 with SSL encryption as an alternative. Port 25 is typically blocked on shared hosting and should be avoided. Your SMTP provider's documentation will confirm the correct port for their service.

Do I need a paid SMTP service for WordPress?

For sites sending fewer than 100-300 emails per day, free tiers from services like SendGrid (100/day), Brevo (300/day), or your existing Gmail/Google Workspace account may be sufficient. For WooCommerce stores or high-traffic sites, a paid transactional email service provides better deliverability, analytics, and dedicated IP addresses.