How to send an email from WordPress?

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


  1. Go to cPanel > Email Accounts.

  2. Click "Create".

  3. Enter the Username and Password for the email account.

  4. Click "Create".

  5. Done!


Step 02: Install Fluent SMTP Plugin


In this article, we are using the Fluent SMTP plugin. You can use any plugin you like.

  1. Log in to WordPress Dashboard:

    Go to cPanel > WordPress Manager by Softaculous > Login.


  2. Go to WordPress Dashboard > Plugins > Add New.

  3. Enter "Fluent SMTP" in the Keyword field to find the plugin.

  4. Click "Install Now" on the Fluent SMTP plugin.

  5. Click "Activate".

Once activated, you need to configure the plugin.


Step 03: Configure Fluent SMTP


  1. Go to WordPress Dashboard > Settings > Fluent SMTP > Settings.

  2. If this is the first time you are configuring the plugin, you can enter details here. Otherwise, go to Active Email Connections > Edit.

  3. 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.


  4. Click "Save Settings".

  5. Go to Fluent SMTP > Settings > General Settings.

  6. 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.

  7. Click "Save Settings".

  8. Done!


Step 04: Send Test Email


  1. Go to WordPress Dashboard > Settings > Fluent SMTP > Email Test.

  2. Click the field next to "From" and select an email address in the dropdown.

  3. Enter an email address next to "Send To". The email will be sent to this email address.

  4. Click "Send Test Email".

  5. The "Test Email Has been successfully sent" message will appear after it sends the email.

  6. 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.:

  1. Create an email account on your hosted email to send email from WordPress.

  2. Depending on your hosted email service, you might need to enable Multi-Factor Authentication.

  3. (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

 

  • 595 Users Found This Useful
Was this answer helpful?

Related Articles

How to install WordPress?

You can use Softaculous or WordPress Toolkit Deluxe to install and manage WordPress, depending on...

How to install LiteSpeed Cache for WordPress?

We automatically install and enable the LiteSpeed Cache for WordPress Plugin (LSCWP) on your...

How to install WP-CLI (WordPress CLI)?

You can install WordPress CLI using SSH. It can be installed without root access. If you do not...

How to change WordPress admin password?

The admin password of WordPress can be changed in multiple ways without knowing the password....

How to attach or remove WordPress in WP Toolkit?

  You can install and manage various aspects of your WordPress website using WP Toolkit. WP...