Skip to main content
Send WordPress emails reliably through mySMTP by configuring the WP Mail SMTP plugin with your SMTP credentials and authenticated domain.

Prerequisites

SMTP settings

Shared IP plans are only available to customers in Denmark.

Configure WP Mail SMTP

WP Mail SMTP is the most widely used plugin for routing WordPress emails through a custom SMTP server.
1

Install WP Mail SMTP

In your WordPress admin, go to Plugins → Add New Plugin. Search for WP Mail SMTP by WPForms, then install and activate it.
2

Start the setup wizard

After activation, click Launch Setup Wizard. Choose Skip to bypass the wizard and go straight to the settings page, or continue with Other SMTP when prompted for a mailer.
3

Select Other SMTP

From the WP Mail SMTP settings, under Mailer, select Other SMTP. This lets you enter any custom SMTP server.
4

Enter mySMTP settings

Fill in the following fields:
  • SMTP Host: relayxx.mysmtp.com (replace with your real hostname from the mySMTP setup email)
  • Encryption: TLS
  • SMTP Port: 587
  • Authentication: On
  • SMTP Username: Your mySMTP username
  • SMTP Password: Your mySMTP password
5

Set the From email and name

In the same settings page, set From Email to an address on your authenticated domain (for example, noreply@yourdomain.com). Set From Name to your brand or site name. Check Force From Email and Force From Name so plugins and themes cannot override them.
6

Save settings and send a test email

Click Save Settings. Then go to the Email Test tab, enter a personal email address, and click Send Email. Confirm the message arrives and shows the correct sender.
The steps above use WP Mail SMTP. This is the plugin we recommend for most WordPress sites because of its large user base, setup wizard, and built-in email test tool.

Secure your password with wp-config.php constants

Storing your SMTP password in the WordPress database is acceptable for many sites, but you can also define it as a PHP constant in wp-config.php so it is not visible in the admin interface. Add these lines above /* That's all, stop editing! */ in wp-config.php:
When WPMS_ON is true, WP Mail SMTP reads settings from constants instead of the database. See the WP Mail SMTP documentation for the full list of constants (for example, WPMS_MAIL_FROM, WPMS_MAIL_FROM_NAME, WPMS_SMTP_HOST, and so on).
Never commit wp-config.php with a hardcoded password to version control. Load the password from environment variables when possible, or keep the file outside your repository.

Troubleshooting

Confirm you are using your real mySMTP hostname (not relayxx.mysmtp.com). Check that port 587 is open on your hosting firewall. If your host blocks 587, try port 2525.
Re-enter your mySMTP username and password, making sure there are no leading or trailing spaces. Copy the values from a password manager if possible.
Verify that your sending domain has SPF, DKIM, and DMARC configured. See DNS settings quick explainer and SPF, DKIM, DMARC, and BIMI explained.
Run the Sender Readiness Checklist and Email Header Analyzer in the mySMTP Deliverability Toolbox.
Make sure WP Mail SMTP is active and the Mailer setting is set to Other SMTP, not Default (none). Other plugins can also override wp_mail; disable them one by one to find conflicts.