Resources     Blog  

  1. Home
  2. WordPress Tutorials
  3. How to Receive WordPress Emails from a Local Server

How to Receive WordPress Emails from a Local Server

In some situations, you will want to receive emails from your WordPress website. This includes security information, plugin messages and other important mail that may need your immediate response. For example, the security plugin Wordfence often sends messages regarding issues it detects.

By default, WordPress uses its own PHP-based messaging ability to send email. However, this is something that a lot of developers would rather avoid as it can cause problems with spam filters and other elements. The mail function may not be enabled on WAMP Mac servers.

In these situations, it’s better to simply set the system to use SMTP when sending WordPress emails from the local server. Using your email server, you can set the site to send email without some of the problems that arise with PHP messaging.

In this tutorial, I’m going to show you how to use email functionality in WordPress on localhost. It’s a quick set up process that will make your site use a specific SMTP server and address other than what you use to install the system.

Using the WP Mail SMTP Plugin

Today, I’m going to demonstrate the WP Mail SMTP plugin. It has nearly three-quarters of a million active installs and is a relatively simple tool to set up and use. One of the features I like most about it is that you can set SSL mail through the system if you have a secured domain.

From WordPress, go to the Plugins section on the left and click, “Add New.”

Plugin Add New

Install and activate the “WP Mail SMTP” plugin. You can find this by using the search field in the right-hand side of the screen. It’s important to note you will see several similar plugins available when searching for WP Mail SMTP. Choose the one that’s labeled, “by WPForms.”

WP Mail SMTP

Once it’s installed, go to the Settings sections and click, “WP Mail SMTP.”

SMTP Mail Settings

Setting Up the Mail Basics

Enter the email address you want to display in the “From” area. If you leave it blank, the default email address WordPress has in the system will be used.

From Email

Enter the name you want the email to be from. For instance, you could put your name or the company name if you plan on using this system to interact with other users.

From Name

Keep the Mailer option set to use SMTP. At any point, you can revert WordPress to use the PHP mail function. For now, however, we want to use SMTP to send messages.

Use SMTP

Click the checkbox for the return path if you want things like non-delivery receipts to go to the address. The return path is also visible to others if you use WordPress to send mail to them.

Return Path

Click the “Save Changes” button. This will keep the above settings before you start entering the information for SMTP.

Save Changes

Setting Up the SMTP Server

For this next part, you will need to know the information regarding your email server. You can access this information using cPanel to manage your email accounts.

Enter the SMTP Host name of the email account. The SMTP host will be provided by your hosting provider. For example, Gmail users would enter “smtp.gmail.com” in this field to access the account. It may also look like, “mail.ggexample.com.”

SMTP Host

Enter the SMTP Port of the email server. This defaults to port 25, which is the standard for outgoing email. However, secured servers such as those using SSL on the domain will have a different number available.

SMTP Port

Choose whether your server uses encryption or not. You can select between SSL and TLS depending on how your web server is set up for security. In most instances, you’ll more likely either select “No Encryption” or “Use SSL encryption.” This is information your web hosting provider will give you if you set up a secured website.

Choose SSL

Select the Authentication method for the email server. This is another point that your web host provider will supply when you set up the email address. A lot of domains will be set up to use SMTP authentication to help prevent unauthorized access to the account. This is perhaps one of the more common practices.

Authentication Method

Enter your username and password for the email account. WordPress will need this to connect to the email server and send messages. However, these values are unnecessary if your email server doesn’t use SMTP authentication.

Username Password

NOTE: For WordPress to use the email server, the password cannot be encrypted. This means it will be visible when you type it into the password field.

Click the “Save Changes” button on the bottom.

Save SMTP Changes

You are now ready to start sending WordPress emails from the local server.

In many ways, this is similar to how you would set up Outlook or any other email system on your computer. The only difference is that WordPress isn’t geared for POP3 responses. For that, you will need to either use Webmail or access the email in another way.

Before you call it complete, you should test the email settings. This gives you a chance to make sure the email address information is correct. If it’s not, you won’t receive messages from WordPress.

Enter a test email address and click the “Send Test” button.

Test Email

If you don’t receive the test message, verify your email settings in WP Mail SMTP are correct.

SMTP over PHP

Many developers prefer the SMTP local host over the PHP mail function for a variety of reasons. From a more professional appearance to preventing being identified as spam, there are distinct advantages to setting up an SMTP account for your website. Decide if it’s right for you and customize your WordPress experience.

What kind of mailing system do you use with WordPress? Are your visitors more receptive to SMTP messages over the PHP function?

Author: Kaumil Patel

Kaumil Patel is the Chief Operating Officer of GreenGeeks and has over 13 years of experience in the web hosting industry working for and owning web hosting companies. Kaumil’s expertise is in marketing, business development, operations, acquisitions and mergers.

Was this article helpful?

Related Articles

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.