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
- Open cPanel → Email → Email Accounts and click Create.
- Create an address such as
noreply@yourdomain.comorwebsite@yourdomain.comwith a strong password. - Click Connect Devices next to the account and note the Outgoing Server and SMTP port under Secure SSL/TLS Settings.
Install an SMTP plugin
- In WordPress go to Plugins → Add New, install and activate WP Mail SMTP (or a similar plugin such as FluentSMTP).
- Open the plugin's settings and set From Email to the mailbox you created, and tick Force From Email.
- Set From Name to your site or company name.
- Choose Other SMTP as the mailer.
Enter the SMTP settings
| Setting | Value |
|---|---|
| SMTP Host | The outgoing server from Connect Devices, e.g. mail.yourdomain.com or the server hostname |
| Encryption | SSL |
| SMTP Port | 465 (or 587 with TLS) |
| Authentication | On |
| Username | The full email address |
| Password | The 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.
