Royal SMTP Documentation
Complete guide to fixing WordPress email deliverability with Royal SMTP. Configure your site to send emails reliably through Gmail, SendGrid, Brevo, Mailgun, Resend, or SMTP.com with just a few clicks.
Getting Started
WordPress uses the PHP mail() function to send emails by default. On many hosting providers, this function is unreliable, blocked, or configured in a way that causes emails to land in spam. Royal SMTP fixes this by routing your site's emails through a proper SMTP server or transactional email API.
Why You Need an SMTP Plugin
Emails Going to Spam
PHP mail() often lacks proper authentication (SPF, DKIM), causing emails to be flagged as spam by Gmail, Outlook, and other providers.
Emails Not Sending at All
Many managed and shared hosts block or limit PHP mail(). Your contact forms, order confirmations, and password resets silently fail.
No Delivery Visibility
Without logging, you have no way to know if emails were sent, bounced, or silently dropped.
Inconsistent From Address
Some plugins override the "From" address. Royal SMTP lets you force a consistent sender name and email across all outgoing mail.
Supported Mailers
| Mailer | Type | Free Tier | Best For |
|---|---|---|---|
| Other SMTP (Gmail, etc.) | SMTP | Varies | Small sites, Gmail users |
| SendGrid | API | 100 emails/day | High-volume transactional email |
| Brevo (Sendinblue) | API | 300 emails/day | Small-to-medium sites, marketing + transactional |
| Mailgun | API | 100 emails/day (trial) | Developers, high deliverability needs |
| Resend | API | 100 emails/day | Modern developer-friendly API |
| SMTP.com | API | 50,000 emails (trial) | Enterprise, large volume senders |
Requirements
- WordPress 5.8 or higher
- PHP 7.4 or higher
- An account with one of the supported mailer services (or your own SMTP server)
Installation
From WordPress.org
Search for the plugin
In your WordPress admin, go to Plugins > Add New and search for "Royal SMTP"
Install and activate
Click "Install Now" then "Activate" once installation completes
Configure settings
Navigate to Settings > Royal SMTP in your admin menu to begin setup
Manual Installation
Download the plugin
Download the ZIP file from my.royalplugins.com or WordPress.org
Upload to WordPress
Go to Plugins > Add New > Upload Plugin, select the ZIP file, and click Install Now
Activate the plugin
Click "Activate Plugin" after installation completes
Quick Start
Get email working reliably in under 5 minutes:
Set your From Email and From Name
Enter the email address and name you want all outgoing emails to be sent from. Check "Force" if you want to override other plugins.
Select a mailer
Choose from Gmail/Other SMTP, SendGrid, Brevo, Mailgun, Resend, or SMTP.com. See the detailed guides below for each mailer.
Enter your credentials
Fill in the required fields for your chosen mailer (API key, SMTP credentials, etc.)
Save and send a test email
Click Save, then scroll to the Test Email section. Enter your email address and click "Send Test Email" to verify everything works.
Enable email logging (optional)
Turn on email logging to keep a record of all outgoing emails for debugging and auditing.
For most WordPress sites, Brevo (Sendinblue) offers the best free tier at 300 emails/day with a simple API key setup. If you already have a Gmail account, the "Other SMTP" mailer with a Gmail App Password is the fastest way to get started.
From Settings
The From Settings control the sender name and email address that appear on all outgoing emails from your WordPress site.
From Email
Enter the email address you want emails to be sent from. This should match or be authorized by your mailer service.
- Force From Email - When checked, this overrides the From Email set by other plugins (e.g., WooCommerce, contact form plugins). Enable this if you want a single consistent sender address across your entire site.
From Name
Enter the name that recipients see as the sender (e.g., "My Company" or "WordPress").
- Force From Name - When checked, this overrides the From Name set by other plugins. Useful for maintaining consistent branding.
Enable the "Force" checkboxes if you notice different plugins sending emails with different sender names or addresses. This ensures every email from your site uses the same identity, which improves deliverability and brand consistency.
Choosing a Mailer
Royal SMTP supports 6 mailers. The settings page shows a dropdown to select your mailer, and the configuration fields change based on your selection.
API-based vs SMTP-based
There are two approaches to sending email:
- API-based mailers (SendGrid, Brevo, Mailgun, Resend, SMTP.com) send emails via a direct HTTPS API call. This is faster, more reliable, and does not require opening SMTP ports. Recommended for most users.
- SMTP-based mailers (Other SMTP / Gmail) connect to a mail server over SMTP protocol. This requires your host to allow outbound connections on ports 587, 465, or 25. Some shared hosts block these ports.
If your host blocks SMTP ports (common on shared hosting), use an API-based mailer. If you already have a Gmail account and your host allows port 587, the Gmail SMTP option is the simplest to configure.
Gmail / Other SMTP Setup
The "Other SMTP" mailer works with any standard SMTP server, including Gmail, Outlook, Yahoo, your hosting provider's mail server, or any custom SMTP service.
Gmail SMTP Settings
| Setting | Value |
|---|---|
| SMTP Host | smtp.gmail.com |
| SMTP Port | 587 |
| Encryption | TLS |
| Authentication | Yes |
| Username | Your full Gmail address (e.g., you@gmail.com) |
| Password | Your Gmail App Password (NOT your regular password) |
Google does not allow regular passwords for SMTP login. You must generate an App Password. See the step-by-step guide below.
How to Create a Gmail App Password
Enable 2-Step Verification
Go to myaccount.google.com/security and enable 2-Step Verification if it is not already on. App Passwords are only available when 2FA is enabled.
Navigate to App Passwords
Go to myaccount.google.com/apppasswords. If you do not see this option, search "App passwords" in your Google Account settings.
Generate a new App Password
Enter a name like "Royal SMTP" or "WordPress" and click Create. Google will display a 16-character password.
Copy and paste into Royal SMTP
Copy the 16-character password (spaces are optional) and paste it into the SMTP Password field in Royal SMTP settings. Click Save.
Free Gmail accounts can send up to 500 emails per day. Google Workspace (paid) accounts can send up to 2,000 emails per day. If you need higher volume, consider an API-based mailer like SendGrid or Brevo.
Other SMTP Servers
You can use any SMTP server. Here are common settings for popular providers:
| Provider | Host | Port | Encryption |
|---|---|---|---|
| Gmail | smtp.gmail.com |
587 | TLS |
| Outlook / Hotmail | smtp-mail.outlook.com |
587 | TLS |
| Yahoo Mail | smtp.mail.yahoo.com |
587 | TLS |
| Zoho Mail | smtp.zoho.com |
587 | TLS |
| Your Hosting Provider | Check with host (often mail.yourdomain.com) |
587 or 465 | TLS or SSL |
SendGrid Setup
SendGrid is a popular transactional email service owned by Twilio. It offers a free tier of 100 emails per day.
Setup Steps
Create a SendGrid account
Sign up at sendgrid.com and complete email verification.
Authenticate your sending domain
In SendGrid dashboard, go to Settings > Sender Authentication and verify your domain by adding DNS records (CNAME). This is critical for deliverability.
Generate an API key
Go to Settings > API Keys > Create API Key. Select "Restricted Access" and enable only "Mail Send" permissions. Copy the key immediately (it is shown only once).
Configure Royal SMTP
In Royal SMTP settings, select "SendGrid" as your mailer and paste your API key into the API Key field. Click Save.
Send a test email
Use the Test Email section to verify delivery. Check both inbox and spam folder.
Always use "Restricted Access" when creating API keys. Only grant "Mail Send" permission. Never use a "Full Access" API key in a WordPress plugin.
Brevo (Sendinblue) Setup
Brevo (formerly Sendinblue) offers a generous free tier of 300 emails per day, making it an excellent choice for most WordPress sites.
Setup Steps
Create a Brevo account
Sign up at brevo.com and verify your email address.
Verify your sending domain
In the Brevo dashboard, go to Senders, Domains & Dedicated IPs > Domains. Add your domain and configure the DNS records (DKIM, SPF) provided by Brevo.
Get your API key
Go to your account name (top right) > SMTP & API > API Keys. Copy your existing v3 API key or generate a new one.
Configure Royal SMTP
In Royal SMTP settings, select "Brevo (Sendinblue)" as your mailer and paste your API key. Click Save.
Send a test email
Verify delivery via the Test Email section.
The free plan allows 300 emails/day with no expiration. For higher volumes, paid plans start at $9/month for 5,000 emails/month.
Mailgun Setup
Mailgun is a developer-focused email service known for high deliverability and detailed analytics. The trial gives you 100 emails/day for free.
Setup Steps
Create a Mailgun account
Sign up at mailgun.com. A credit card may be required for verification even on the free tier.
Add and verify your domain
In the Mailgun dashboard, go to Sending > Domains > Add New Domain. Follow the instructions to add DNS records (TXT for SPF, CNAME for DKIM, MX records).
Get your API key and domain
Go to Settings > API Security to find your Private API Key. Also note your verified sending domain (e.g., mg.yourdomain.com).
Configure Royal SMTP
Select "Mailgun" as your mailer. Enter both your API Key and your Mailgun Domain. Click Save.
Send a test email
Verify delivery via the Test Email section.
Mailgun will not send emails from unverified domains. Until your DNS records propagate and are verified, emails will fail. DNS propagation can take up to 48 hours.
Resend Setup
Resend is a modern, developer-friendly email API with a clean interface and generous free tier of 100 emails/day (3,000/month).
Setup Steps
Create a Resend account
Sign up at resend.com using your email or GitHub account.
Verify your domain
In the Resend dashboard, go to Domains > Add Domain. Add the DNS records (MX, TXT, CNAME) Resend provides to your domain's DNS settings.
Generate an API key
Go to API Keys > Create API Key. Give it a descriptive name like "Royal SMTP" and select the "Sending access" permission. Copy the key.
Configure Royal SMTP
Select "Resend" as your mailer and paste the API key. Click Save.
Send a test email
Verify delivery via the Test Email section.
Before verifying your own domain, Resend lets you send test emails from onboarding@resend.dev. This is useful for confirming the integration works before committing to DNS changes.
SMTP.com Setup
SMTP.com is an enterprise email relay service offering a trial of 50,000 emails. It is well-suited for high-volume senders who need guaranteed deliverability.
Setup Steps
Create an SMTP.com account
Sign up at smtp.com and complete account verification.
Get your API key
In the SMTP.com dashboard, navigate to the API section and generate or copy your API key.
Find your Sender name
Go to Senders in your SMTP.com dashboard. Note the sender name (also called "channel") you want to use. This is required for the Royal SMTP configuration.
Configure Royal SMTP
Select "SMTP.com" as your mailer. Enter both the API Key and the Sender name. Click Save.
Send a test email
Verify delivery via the Test Email section.
The "Sender" in SMTP.com is a channel/account identifier used for routing, separate from the "From Email" address recipients see. Make sure you configure both correctly.
Test Email
After configuring your mailer, always send a test email to verify everything works before relying on it for critical emails.
How to Send a Test Email
Save your settings first
Make sure you have saved your mailer configuration before testing.
Enter a recipient email
In the "Test Email" section on the settings page, enter the email address you want to send the test to.
Click Send Test Email
Click the button and wait for the result. You should see a success message if the email was sent.
Check your inbox
Look for the test email in your inbox. Also check the spam/junk folder. If it arrived in spam, you may need to configure SPF and DKIM records for your sending domain.
If the test email fails, check the error message displayed. Common causes include incorrect API keys, blocked SMTP ports, or unverified sending domains. See the Troubleshooting section below for detailed solutions.
Email Logging
Royal SMTP can log all outgoing emails from your WordPress site, giving you visibility into what is being sent and whether it succeeded.
Enabling Email Logging
In the Royal SMTP settings page, find the "Email Logging" section:
- Enable Logging - Check this box to start recording all outgoing emails.
- Log Retention - Set the maximum number of email logs to keep. Older logs are automatically deleted when this limit is reached.
Viewing the Email Log
Navigate to the Email Log page (accessible from the Royal SMTP admin menu) to see a list of all logged emails. Each entry shows:
- Date/Time - When the email was sent
- To - Recipient email address
- Subject - Email subject line
- Status - Whether the email was sent successfully or failed
Enable email logging when troubleshooting deliverability issues. The log will show you if emails are being sent at all, and any error messages from the mailer service.
Email logs may contain personal data (recipient addresses, subjects). If your site is subject to GDPR or similar regulations, set a reasonable log retention limit and document email logging in your privacy policy.
Troubleshooting
Test email fails with "Could not authenticate"
- Gmail users: Make sure you are using an App Password, not your regular Google password. See the Gmail setup guide above.
- API mailers: Double-check that the API key is correct and has not been revoked. Copy-paste it again to avoid trailing spaces.
- SMTP mailers: Verify that the username and password are correct and that the account is active.
Test email fails with "Connection timed out"
- Your hosting provider is likely blocking outbound SMTP connections on port 587 or 465.
- Solution 1: Contact your host and ask them to open port 587 for outbound connections.
- Solution 2: Switch to an API-based mailer (SendGrid, Brevo, Mailgun, Resend, or SMTP.com). API mailers use HTTPS (port 443) which is never blocked.
Emails are sending but going to spam
- Set up SPF record: Add a TXT DNS record that authorizes your mailer service to send on behalf of your domain.
- Set up DKIM: Add the DKIM DNS records provided by your mailer service for cryptographic email signing.
- Set up DMARC: Add a DMARC record to tell receiving servers how to handle authentication failures. A minimal record:
v=DMARC1; p=none; rua=mailto:you@yourdomain.com - Verify From Email: The "From Email" in Royal SMTP should use a domain you own and have authenticated, not a free email like gmail.com or yahoo.com.
SPF, DKIM, and DMARC are the three pillars of email authentication. Without them, even a properly configured SMTP setup will have deliverability issues. Every mailer provider listed above has documentation on how to set these up for your domain.
Emails are not sending at all (no error shown)
- Enable Email Logging in Royal SMTP settings to see if emails are being attempted.
- Check if another plugin is overriding the
wp_mailfunction. Deactivate other SMTP or email plugins. - Verify the plugin is activated and the mailer is configured (not set to the default/blank option).
WooCommerce order emails not sending
- WooCommerce uses standard
wp_mail(), so Royal SMTP handles it automatically. - Check WooCommerce > Settings > Emails to make sure the email notifications are enabled.
- Check the "From Email" address. Some mailers reject emails from unverified addresses.
Contact form emails not arriving
- Most contact form plugins (WPForms, Contact Form 7, Gravity Forms, FormForge) use
wp_mail()and are automatically handled. - Check the form plugin settings for its own "From Email" configuration. If it conflicts with Royal SMTP, enable "Force From Email" in Royal SMTP settings.
Gmail App Password not working
- Confirm 2-Step Verification is enabled on your Google account (required for App Passwords).
- Make sure you are entering the 16-character App Password, not your regular Gmail password.
- If your Google account is managed by an organization (Google Workspace), ask your admin to allow App Passwords.
- Try regenerating the App Password. Old App Passwords can be revoked without notice.
Common SMTP Ports Reference
When using the "Other SMTP" mailer, you need to specify the correct port and encryption. Here is a quick reference:
| Port | Encryption | Description | Recommended |
|---|---|---|---|
587 |
TLS (STARTTLS) | Standard secure SMTP submission port. Connection starts unencrypted and upgrades to TLS via STARTTLS command. | Yes - Use this |
465 |
SSL | Implicit SSL/TLS. Connection is encrypted from the start. Some older servers and providers use this. | Fallback option |
25 |
None | Original SMTP port. Unencrypted and blocked by most hosting providers and ISPs. Not suitable for authentication. | Avoid |
2525 |
TLS | Alternative port used by some providers (e.g., Mailgun, SendGrid SMTP relay) when port 587 is blocked. | Alternative |
Always try port 587 with TLS first. If it does not work (connection timeout), try port 465 with SSL. If both fail, your host is likely blocking outbound SMTP - switch to an API-based mailer instead.
Frequently Asked Questions
Do I need Royal SMTP if my emails are already working?
If your emails are reliably reaching inboxes (not spam), you may not need it immediately. However, Royal SMTP adds deliverability insurance, email logging, and a consistent sender identity. Many sites discover email problems only when a critical email (password reset, order confirmation) fails to deliver.
Will this plugin conflict with other SMTP plugins?
You should only have one SMTP/email plugin active at a time. If you are switching from WP Mail SMTP, Post SMTP, or another email plugin, deactivate it before activating Royal SMTP.
Do I need to configure DNS records (SPF, DKIM)?
Yes, for best deliverability. All API-based mailers (SendGrid, Brevo, Mailgun, Resend, SMTP.com) provide domain verification steps that include SPF and DKIM records. Even for Gmail SMTP, having proper SPF records for your domain helps prevent spam filtering.
Can I use a free Gmail account?
Yes, but with limitations. Free Gmail accounts allow up to 500 emails/day and require an App Password. For business use, consider Google Workspace or an API-based mailer for higher limits and better deliverability.
What happens if my mailer service goes down?
If your configured mailer is unavailable, email sending will fail and errors will be logged (if logging is enabled). WordPress does not queue failed emails for retry by default. For mission-critical email, consider the reliability guarantees of your chosen mailer.
Does Royal SMTP work with multisite?
Royal SMTP works on individual sites within a multisite network. Each site can have its own SMTP configuration.
Is my API key stored securely?
API keys and SMTP passwords are stored in the WordPress database within the options table. They are not encrypted at rest (this is standard for WordPress plugins). Ensure your WordPress database is properly secured and limit admin access to trusted users.
Which mailer has the best free tier?
Brevo (Sendinblue) offers 300 emails/day for free with no expiration, making it the most generous free tier. SendGrid and Resend offer 100 emails/day. For a one-time trial, SMTP.com provides 50,000 emails.