You can easily send email from WordPress using SMTP. You need to create an email account and use it in a WordPress plugin.
There are many plugins that allow you to send emails using SMTP. You can use one that is popular and has good remarks from its users:
https://wordpress.org/plugins/search/SMTP/
Once the SMTP plugin is configured, all plugins and themes will automatically use SMTP to send an email. No other configuration is required.
An SMTP plugin does not add any additional load to the website. It uses the PHPMailer.php script to send an email, which is already part of WordPress core files. The plugin simply instructs WordPress to use SMTP instead of mail() when sending an email.
Using SMTP also has an advantage. The mail() function is one of the most common sources of spam. Mail servers around the world are increasingly marking emails sent using mail() as spam. Using SMTP helps you avoid that and improves email delivery.
Applies To:
This guide applies to Web Hosting, Semi Dedicated Hosting, and Reseller Hosting.
Step 01: Create an Email Address to Use in WordPress
- Go to cPanel > Email Accounts.
- Click "Create".
- Enter the Username and Password for the email account.
- Click "Create".
- Done!
Step 02: Install Fluent SMTP Plugin
In this article, we are using the Fluent SMTP plugin. You can use any plugin you like.
- Log in to WordPress Dashboard:
Go to cPanel > WordPress Manager by Softaculous > Login. - Go to WordPress Dashboard > Plugins > Add New.
- Enter "Fluent SMTP" in the Keyword field to find the plugin.
- Click "Install Now" on the Fluent SMTP plugin.
- Click "Activate".
Once activated, you need to configure the plugin.
Step 03: Configure Fluent SMTP
- Go to WordPress Dashboard > Settings > Fluent SMTP > Settings.
- If this is the first time you are configuring the plugin, you can enter details here. Otherwise, go to Active Email Connections > Edit.
- Configure the settings as mentioned below:
- Connection Provider/Email Service Provider: Other SMTP
- Sender Settings
From Email: <your email address, e.g.,you@yourdomain.com
>
From Name: <your name or website name>
Force From Email:Enabled
Set the return path to match the From Email:Enabled
Force Sender Name: Disabled - SMTP Host: <server hostname, e.g.,
server.providerdomain.com
(recommended) or mail.yourdoamin.com>
SMTP Port:465
Encryption:SSL
Use Auto TLS: Enabled
Authentication:Enabled
Store Access Keys in DB: Enabled - SMTP Username: <your email address, e.g.,
you@yourdomain.com
>
SMTP Password: <your email password>
Note:
If you get any error using [mail.yourdoamin.com] as the SMTP Host, try using [server.providerdomain.com].
Do not use the default email address of your hosting account as the SMTP Username. The default email address looks like username@server.providerdomain.com.
- Connection Provider/Email Service Provider: Other SMTP
- Click "Save Settings".
- Go to Fluent SMTP > Settings > General Settings.
- Make sure the following values are correct:
- Default Connection: SMTP - you@yourdomain.com
- Deselect "Disable sending all emails".
Enabling this option will disable all emails.
- Default Connection: SMTP - you@yourdomain.com
- Click "Save Settings".
- Done!
Step 04: Send Test Email
- Go to WordPress Dashboard > Settings > Fluent SMTP > Email Test.
- Click the field next to "From" and select an email address in the dropdown.
- Enter an email address next to "Send To". The email will be sent to this email address.
- Click "Send Test Email".
- The "Test Email Has been successfully sent" message will appear after it sends the email.
- Done!
You should now be able to send email from WordPress. If you use a CDN or external email, please refer to the steps below.
CDN/Cloudflare/QUIC.cloud
If you use a CDN, Cloudflare, QUIC.cloud, or their nameservers, make sure the SMTP Host (mail.yourdomain.com) is not proxied by Cloudflare/QUIC.cloud/CDN.
If the SMTP Host is proxied, the plugin will not connect to the mail server and time out.
External SMTP
If you use an external email account that is not hosted on your hosting account, e.g., hosted email services like SendGrid, Mailchimp, Gmail, Yahoo, Hotmail, etc.:
- Create an email account on your hosted email to send email from WordPress.
- Depending on your hosted email service, you might need to enable Multi-Factor Authentication.
- (Old servers only) Contact support to enable external SMTP for your hosting account. You do not need to contact support if you use an email account hosted on the same hosting account or if you are on a recently deployed server.
Multi-Factor Authentication (2 Factor Authentication)
If you use the following hosted email services to send email from WordPress and have enabled Multi-Factor Authentication (2 Factor Authentication) for your hosted email, you need to create an App Password in your hosted email account settings (not on MechanicWeb servers).
Once created, use the App Password as the SMTP Password in the plugin:
- Gmail/Google Workspace
https://support.google.com/accounts/answer/185833?hl=en
https://myaccount.google.com/apppasswords
If you cannot create an app password in Gmail:https://fluentsmtp.com/docs/connect-gmail-or-google-workspace-emails-with-fluentsmtp
- Office 365/Hotmail
https://account.live.com/security
https://support.microsoft.com/en-us/account-billing/how-to-use-two-step-verification-with-your-microsoft-account-c7910146-672f-01e9-50a0-93b4585e7eb4
- Yahoo Mail
https://login.yahoo.com/account/security#less-secure-apps
https://help.verizonsmallbusinessessentials.com/s/article/SLN29264
https://help.turbify.com/s/article/SLN29264
- AOL
https://login.aol.com/account/security?lang=en-US
- Zoho
https://accounts.zoho.com/home#security/app_password