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.

Setup
- Open Settings > Email providers.
- Select SMTP.
- Enter the Host. Do not include
https://or a path. - Enter the Port.
- Choose the Encryption that matches the port. Port 587 usually uses TLS, port 465 uses SSL, and port 25 uses none.
- Enter the Username.
- Enter the Password.
- Leave SMTP authentication on unless you run a local relay without a login.
- 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.
| Provider | Host | Port | Encryption | Username |
|---|---|---|---|---|
| Amazon SES | email-smtp.{region}.amazonaws.com | 587 | TLS | Generated SES SMTP username |
| SendGrid | smtp.sendgrid.net | 587 | TLS | apikey |
| Mailgun | smtp.mailgun.org or smtp.eu.mailgun.org | 587 | TLS | SMTP login from the domain settings |
| Brevo | smtp-relay.brevo.com | 587 | TLS | SMTP login from Brevo |
| Postmark | smtp.postmarkapp.com | 587 | TLS | Server token |
| SMTP2GO | mail.smtp2go.com | 587 | TLS | SMTP 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
| Problem | What to check |
|---|---|
| Connection timed out | Wrong host or port, or your host blocks outbound SMTP. Try port 587, then ask your hosting provider. |
| Certificate error | The encryption does not match the port. Try TLS with 587 or SSL with 465. |
535 Authentication failed | Wrong username or password. Some providers need a generated SMTP password, not the account password. |
553 From address not owned | Use a From address allowed by the SMTP account. |
| Connection works, mail is rejected | The 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
- Read SMTP settings explained if a field is unclear.
- Fix a failed login with SMTP authentication failed.
- Check your domain with Email authentication.