WordPress

Send WordPress email through SMTP

Make WordPress emails arrive reliably: create a cPanel mailbox, configure an SMTP plugin with the right host, port and encryption, test delivery and fix SPF and DKIM.

IntermediatecPanel hosting3 min read

By default WordPress sends mail with PHP's mail() function, using a sender like wordpress@yourdomain.com. Many receiving servers treat that mail as suspicious, so password resets, contact form messages and order emails end up in spam or vanish. Sending through an authenticated SMTP mailbox fixes this.

Before you start

  • Your domain's email handled by MdmHost, or an external provider you can send from.
  • Administrator access to WordPress.

Create a sending mailbox

  1. Open cPanel → Email → Email Accounts and click Create.
  2. Create an address such as noreply@yourdomain.com or website@yourdomain.com with a strong password.
  3. Click Connect Devices next to the account and note the Outgoing Server and SMTP port under Secure SSL/TLS Settings.

Install an SMTP plugin

  1. In WordPress go to Plugins → Add New, install and activate WP Mail SMTP (or a similar plugin such as FluentSMTP).
  2. Open the plugin's settings and set From Email to the mailbox you created, and tick Force From Email.
  3. Set From Name to your site or company name.
  4. Choose Other SMTP as the mailer.

Enter the SMTP settings

SettingValue
SMTP HostThe outgoing server from Connect Devices, e.g. mail.yourdomain.com or the server hostname
EncryptionSSL
SMTP Port465 (or 587 with TLS)
AuthenticationOn
UsernameThe full email address
PasswordThe mailbox password

If mail.yourdomain.com gives a certificate warning, use the server hostname shown in Connect Devices, which always has a valid certificate.

Send a test

Use the plugin's Email Test tab to send a message to an address at a different provider, such as Gmail. Check the inbox and spam folder. In Gmail open the message, choose Show original and confirm SPF, DKIM and DMARC say PASS.

Check SPF and DKIM

Open cPanel → Email → Email Deliverability. Both DKIM and SPF should show as valid for your domain. If your DNS is hosted elsewhere, click Manage and copy the suggested records into your DNS provider.

Using an external provider

If your domain's email is hosted with Google Workspace or Microsoft 365, either use their SMTP relay settings in the plugin, or a transactional service such as Brevo, Mailgun or Amazon SES. Add the provider to your SPF record so receivers trust it.

Troubleshooting

  • Connection timed out: wrong port or host. Try 465 with SSL; if it still fails, ask support to check outgoing SMTP for your account.
  • Authentication failed: the username must be the full address, and the password the mailbox password, not your cPanel password.
  • Mails still in spam: the From address does not match the authenticated mailbox, or SPF lists another server.
  • Contact form sends but nothing arrives: check the form plugin's notification settings and the mailbox's quota.

Good habits for site email

  • Use a dedicated mailbox for the website, so you can change its password without affecting your personal email.
  • Enable the plugin's email log for a few days after setup to confirm every message type (password resets, form notifications, orders) is sent.
  • For contact forms, put the visitor's address in Reply-To, not in From. Sending "from" a Gmail address through your server fails DMARC checks.
  • Keep bulk newsletters off your hosting mailbox; use a dedicated newsletter service for lists.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.