Skip to main content

How to Configure Any SMTP Server in WordPress

Use the SMTP card when a provider gives you SMTP credentials, or when you run your own mail server. This guide calls it Custom SMTP to separate it from a provider-specific card. The card itself is labeled SMTP.

It also works for a provider that has an API card but you prefer SMTP.

What you need​

  • SMTP host.
  • Port.
  • Encryption type.
  • Username.
  • Password.

Your provider's SMTP settings page has all five. Copy them exactly.

The SMTP card with example values
Example values. Your provider gives you the real host, port, encryption, username, and password.

Setup​

  1. Open Settings > Email providers.
  2. Select SMTP.
  3. Enter the Host. Do not include https:// or a path.
  4. Enter the Port.
  5. Choose the Encryption that matches the port. Port 587 usually uses TLS, port 465 uses SSL, and port 25 uses none.
  6. Enter the Username.
  7. Enter the Password.
  8. Leave SMTP authentication on unless you run a local relay without a login.
  9. Save changes. Set this provider as default if the button is shown. Then click Test connection.

Common SMTP values​

These are common starting points. Always confirm with your provider, because hosts and ports can change.

ProviderHostPortEncryptionUsername
Amazon SESemail-smtp.{region}.amazonaws.com587TLSGenerated SES SMTP username
SendGridsmtp.sendgrid.net587TLSapikey
Mailgunsmtp.mailgun.org or smtp.eu.mailgun.org587TLSSMTP login from the domain settings
Brevosmtp-relay.brevo.com587TLSSMTP login from Brevo
Postmarksmtp.postmarkapp.com587TLSServer token
SMTP2GOmail.smtp2go.com587TLSSMTP username from the dashboard

For SendGrid, the password is the API key, not your account password. For Postmark, both the username and password are the server token.

Test and set the sender​

Click Test connection. Then click Send test email.

Open Settings > Sender identity and make sure the From address is allowed by the SMTP server. Many servers reject a From address that does not belong to the authenticated account.

Common problems​

ProblemWhat to check
Connection timed outWrong host or port, or your host blocks outbound SMTP. Try port 587, then ask your hosting provider.
Certificate errorThe encryption does not match the port. Try TLS with 587 or SSL with 465.
535 Authentication failedWrong username or password. Some providers need a generated SMTP password, not the account password.
553 From address not ownedUse a From address allowed by the SMTP account.
Connection works, mail is rejectedThe provider may require a verified domain or a different sender. Check its logs.

When to use the provider card instead​

If the provider has its own card in LetterPress, the card is usually easier. It tests the API key, returns clearer errors, and can read account details.

Use custom SMTP when:

  • The provider only gives SMTP credentials.
  • Your firewall blocks API traffic.
  • You run your own mail server.
  • You need a local relay for development.

Next steps​