Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Hosting · Info

WordPress Email Server Settings Explained: What Each Option Does

WordPress Email Server Settings Explained: What Each Option Does

Short answer

WordPress email server settings are the SMTP details an SMTP plugin uses to send mail through a real mail server. The key fields are host, port, encryption, username, password and From Email. Most sites use port 587 with TLS or port 465 with SSL.

Key takeaways

  • WordPress core has no mail server settings screen.
  • Use port 587 with TLS or 465 with SSL.
  • Match the encryption type to the port.
  • Set From Email to a real mailbox on your domain.
  • SPF, DKIM and DMARC live in DNS, not WordPress.
  • Always send a test email after changing settings.

What are WordPress email server settings?

WordPress email server settings are the SMTP details, such as host, port, encryption, username and password, that tell WordPress which mail server should send its emails instead of the web server's default mail function.

Out of the box, WordPress sends mail through the PHP mail function via its wp_mail wrapper. It has no settings screen for a mail server at all.

Those server settings appear once you install an SMTP plugin, or when your host or form plugin offers its own mail options. Each field controls one part of how a message leaves your site.

This guide explains what each option means. For the full setup process, see our guide on how to set up SMTP in WordPress.

Why doesn't WordPress have mail server settings by default?

WordPress leaves sending to the server, so core only calls the wp_mail function and lets PHP hand the message to whatever mail system the host provides.

The wp_mail reference shows that it builds the message with the bundled PHPMailer library. By default PHPMailer uses PHP's mail function rather than authenticated SMTP.

That works on some hosts, but messages often land in spam or vanish. They are not signed by your domain's mail provider, so receiving servers do not trust them.

An SMTP plugin swaps that default for a proper connection to a real mail server, which is why the settings below matter.

What does the SMTP host field do?

The SMTP host is the address of the outgoing mail server your site connects to, such as your host's mail server or a provider like Gmail, Microsoft 365, Brevo or Amazon SES.

Each provider publishes its own host name. A hosting mailbox often uses a name like mail followed by your domain, but check your control panel to be sure.

If the host is wrong, the plugin cannot connect at all. You will usually see a connection or timeout error in the test email log.

Many SMTP plugins also offer built-in mailer options for popular services. Those connect through an API instead of a raw SMTP host, which can be faster and avoids blocked ports.

Which SMTP port should you use?

Use port 587 with TLS or port 465 with SSL for authenticated sending, because port 25 is mainly for server-to-server relay and many hosts block it.

Here is a quick reference for the usual combinations.

PortEncryptionTypical use
587TLS (STARTTLS)Standard authenticated sending, most common choice
465SSL (implicit TLS)Authenticated sending, preferred by some providers
25None or STARTTLSServer-to-server relay, often blocked on shared and cloud hosting
2525TLSAlternative some email services offer when 587 is blocked

The RFC 8314 standard recommends implicit TLS on port 465 for mail submission, while port 587 with STARTTLS remains widely supported.

If neither 587 nor 465 works, your host may block outgoing SMTP. Ask support, or use an API-based mailer that sends over normal HTTPS.

What does the encryption setting mean?

The encryption setting decides how the connection to the mail server is secured: SSL wraps it from the start, TLS upgrades a plain connection, and None sends credentials unprotected.

Match the encryption to the port. Port 465 pairs with SSL, and port 587 pairs with TLS. A mismatch is one of the most common causes of failed connections.

Some plugins include an Auto TLS option. It upgrades to TLS when the server supports it. Leave it on unless your provider tells you otherwise.

Avoid None on any public network. Without encryption, your mailbox password travels in readable form.

What are SMTP authentication, username and password?

Authentication tells the mail server who you are, so you enter the full mailbox address as the username and either the mailbox password or an app password as the password.

Turn authentication on for almost every provider. Without it, the server will refuse to relay mail for your domain.

Providers like Google and Microsoft may require an app password or OAuth sign-in instead of your normal password, especially when two-factor sign-in is on. Check the provider's help page for current requirements.

Storing passwords in the database is convenient but less secure. Some plugins let you define them as constants in wp-config.php instead.

If you see an authentication error, our guide on how to fix SMTP could not authenticate lists the usual causes.

What do the From Email and From Name fields control?

From Email is the address your messages appear to come from, and From Name is the label recipients see, so both should match a real mailbox on the domain you send through.

WordPress uses wordpress@ followed by your domain by default. Many mail servers reject or flag that address if no such mailbox exists.

Set the From Email to an address on your own domain that your SMTP account is allowed to send as. Sending as a Gmail address through your host's server will fail authentication checks.

Most SMTP plugins offer a Force From Email option. It overrides the From address set by other plugins, such as form plugins, so every message stays consistent.

What is the Return-Path setting?

The Return-Path is the address that receives bounce messages, and setting it to match the From Email helps you see delivery failures instead of losing them.

When a recipient address does not exist, the receiving server sends a bounce notice to the Return-Path. If it points nowhere, you never learn about the failure.

Some plugins include a checkbox to set the Return-Path to match the From Email. Turn it on unless your mail service manages bounces for you.

How do DNS records relate to email server settings?

DNS records like SPF, DKIM and DMARC are not entered in WordPress, but they tell receiving servers that your chosen mail server is allowed to send for your domain.

SPF lists which servers may send mail for the domain. DKIM adds a cryptographic signature. DMARC tells receivers what to do when checks fail.

Without these records, even a perfectly configured SMTP plugin may land in spam. Gmail and Yahoo now expect authentication for most bulk senders.

Google's email sender guidelines explain what Gmail checks. Our guide on how to set up SPF, DKIM and DMARC shows how to add the records.

How are incoming mail settings different?

IMAP and POP3 settings are for reading mail in an email app, not for WordPress sending, so you only need the outgoing SMTP details inside WordPress.

Your hosting control panel usually lists both incoming and outgoing servers together. That is why people sometimes enter the IMAP port, such as 993, into an SMTP plugin by mistake.

WordPress never needs to read your inbox for normal site email. Only specialist features, such as posting by email, use incoming settings.

If you need a mailbox on your domain first, our guide on how to set up email with WordPress hosting covers creating one.

How do you check that your settings work?

Send a test email from the SMTP plugin, then check the inbox, the spam folder and the plugin's debug output to confirm the server accepted the message.

Most SMTP plugins include an email test tab. It shows connection errors in plain text, which points straight at the wrong field.

Also test a real site action, such as a password reset or a contact form. Some plugins send through their own settings and need checking separately.

Our guide on how to test WP Mail SMTP explains how to read the test results. The WP Mail SMTP plugin page lists the mailers it supports.

Frequently asked questions

Where are the email server settings in WordPress?

WordPress core has none. Settings appear once you install an SMTP plugin, usually under its own menu or under Settings. Some form, shop and newsletter plugins also have their own sending options that you may need to configure separately.

What SMTP port should I use for WordPress?

Use 587 with TLS or 465 with SSL for authenticated sending. Port 25 is often blocked by hosts and cloud providers. If both common ports fail, ask your host or switch to an API-based mailer that sends over HTTPS.

Should I use SSL or TLS for WordPress email?

Use the one that matches your port. Port 465 uses SSL, also called implicit TLS, and port 587 uses TLS through STARTTLS. Both encrypt the connection, so pick the combination your mail provider recommends.

Can I use my Gmail account as the WordPress mail server?

Yes, through an SMTP plugin that supports Google, usually with OAuth sign-in or an app password. Gmail has sending limits, so a dedicated transactional email service is better for busy sites or shops with many order emails.

Why do my emails go to spam even with SMTP set up?

The domain may lack SPF, DKIM or DMARC records, or the From Email may not match the account you send through. Add the DNS records your provider gives you and keep the From address on your own domain.

Sources

  1. wp_mail() function reference WordPress Developer Resources
  2. RFC 8314: Cleartext Considered Obsolete RFC Editor
  3. Email sender guidelines Google Workspace Admin Help
  4. WP Mail SMTP plugin WordPress.org

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.