After developing your WordPress website (a process that’s made easy with Idea Maker’s theme development guide), you must set up an SMTP mail server to send and receive emails. After all, 81% of small businesses rely on email as their primary driver for customer acquisition.
This guide aims to help you understand how to set up and use an SMTP mail server for your WordPress website. By the end, you should have substantial knowledge of what SMTP is and how it works. Keep reading to find out more.
Table of Contents
What Is An SMTP Mail Server?
SMTP stands for Simple Mail Transfer Protocol. It is used to send and receive emails between internet users and is compatible with the WordPress platform. However, to use SMTP with a WordPress site, you will first need to set up an SMTP server.
Setting up an SMTP mail server is essential as it is the only dedicated protocol available for sending emails. It is used by almost all email clients, from AOL to Gmail. The alternative is a basic PHP configuration with limited uses and few benefits.
Benefits of an SMTP
By default, your WordPress site’s mailing server will run through a basic PHP protocol that has multiple issues. Setting up a WordPress SMTP service for your site brings several advantages.
Spam Prevention
SMTP mail servers add a layer of security to your mailbox through spam prevention settings, such as DomainKeys Identified Mail (DKIM). Typically, a WordPress PHP email server does not feature spam prevention options. This leads to many emails, both sent and received, going straight to spam.
Protocol Integration
By using SMTP, users can combine it with other protocols and settings such as DNS, DMARC, and SPF. As a result, a WordPress installation can reliably send emails to any recipient without fear of being labeled spam.
Professional Hostnames
When using WordPress’s default PHP email server, your email is given a generic hostname identity depending on the server host. For example, “[name]@server.com” or “[name]@wordpress.com” make your emails appear unprofessional and untrustworthy. Using your own SMTP mail server means you can use your domain name, such as [name]@[companyname].com.
Accessibility
When configuring your email address to a mail client, it will have several options for SMTP connection. As a result, regardless of host, email provider, or device, you can easily integrate your email server with any number of email clients.
Trustworthy Emails
The SMTP authentication process allows email servers to recognize the sender’s identity. This means mail servers can prove emails are genuine and verified. Untrusted servers cannot prove that they are allowed to send emails in your name, so all mail servers in the world will automatically block the untrusted emails.
Free SMTP Server Mailer Options
Before configuring your WordPress SMTP for email use, you’ll first need to choose an SMTP server to host your emails. As explained in this Idea Maker guide, there are many types of WordPress hosting to consider. To start, however, you may wish to consider the following free SMTP server mailer options.
Gmail SMTP
Gmail has 1.8 billion users, accounting for 27% of all open email accounts. The platform has much more functionality than most users realize, including a free SMTP server. Upgrading to a Google Workspace account increases Gmail’s SMTP uses, adding features such as custom domain names.
Sendgrid
Sendgrid offers users 100 free emails per day after a one-month trial with premium perks. The platform gives users access to detailed analytics and logging, with options for email marketing. Like the Gmail SMTP, Sendgrid integrates with WordPress through a generated API key.
Pepipost
The Pepipost platform allows users to send 100 free emails per day. It also generates real-time reports and analytics about your email sending habits. Unlike Gmail SMTP and Sendgrid, Pepipost offers an official WordPress plugin that enables you to connect its API to your site easily.
Amazon SES
Amazon Simple Email Service (SES) lets users send up to 62,000 free emails each month if they are sent from an Amazon EC2 hosted site. Otherwise, emails sent using Amazon SES start at $0.10 per 1000. Integrating WordPress with Amazon SES and EC2 is complex but yields excellent results.
How to configure an SMTP Server in WordPress
Many WordPress installations are hosted on shared servers, such as GoDaddy or SiteGround. This can often mean that WordPress servers are not pre-configured for use with SMTP, leaving users to make do with PHP. Fortunately, there are two ways a WordPress site can be modified for SMTP use: manually or through a plugin.
Plugin Configuration
One of the best plugins available for SMTP mail server configuration is Easy WP SMTP. It allows users to enter their own SMTP host credentials, which authenticates emails and signs them with the DKIM through the SMTP server. This process verifies your emails come from a trusted server.
Installing Easy WP SMTP
First, you’ll need to install the Easy WP SMTP plugin. Thanks to WordPress’s extensive first-party moderated plugin database of over 59,000 add-ons, this process is made simple.
Manual Plugin Installation
Depending on the setup of your WordPress site, you may wish to install the Easy WP SMTP plugin manually. Follow these steps for a smooth installation.
How To Configure Easy WP SMTP
Once you’ve installed Easy WP SMTP, the plugin will be integrated with your WordPress installation and appear in the ‘settings’ tab on your dashboard. Upon selecting the settings tab, you will see an option for ‘SMTP Settings.’ Here is where you can configure your WordPress SMTP plugin by filling out the required details.
Filling out the Easy WP SMTP form is simple enough and will allow you to send secure emails from your WordPress account. After inputting your information, ensure you click ‘Save Changes’; otherwise, your data will be lost.
Manual Configuration
Alternatively, if you’d like to keep your plugin use to a minimum, you can manually configure WordPress to send SMTP emails. This way, you have complete control over the code and less risk of site slowdown.
A manual configuration of WordPress SMTP settings requires you to modify your wp-config.php and functions.php files. It’s best to have, at least, a basic understanding of WordPress programming if opting for a manual configuration.
Locate Your Files
To access your wp-config.php and functions.php files, navigate to your WordPress admin dashboard and select Appearances > Theme Editor. You will see a list of all your WordPress theme source files on the right-hand sidebar. There you will find wp-config.php and functions.php.
Edit wp-config.php
First, you’ll need to add the following code to your wp-config.php file, replacing example data with your own.
// Configures WordPress to use SMTP server define( 'SMTP_USER', 'hello@yoursite.com.com' ); // Username to use for SMTP authentication define( 'SMTP_PASS', 'SMTP_PASSWORD' ); // Password to use for SMTP authentication define( 'SMTP_HOST', 'smtp.smtpserver.com' ); // The hostname of the mail server define( 'SMTP_FROM', 'hello@yoursite.com' ); // SMTP From email address define( 'SMTP_NAME', 'FROM_NAME' ); // SMTP From name define( 'SMTP_PORT', '25' ); // SMTP port number - likely to be 25, 465 or 587 define( 'SMTP_SECURE', 'tls' ); // Encryption system to use - ssl or tls define( 'SMTP_AUTH', true ); // Use SMTP authentication (true|false) define( 'SMTP_DEBUG', 0 ); // for debugging purposes only set to 1 or 2
Edit functions.php
Next, you’ll need to add the following code to your ‘functions.php’ file. It’s best to modify your child’s theme functions file in case anything goes awry.
// Configures SMTP authentication add_action( 'phpmailer_init', 'send_smtp_email' ); function send_smtp_email( $phpmailer ) { $phpmailer->isSMTP(); $phpmailer->Host = SMTP_HOST; $phpmailer->SMTPAuth = SMTP_AUTH; $phpmailer->Port = SMTP_PORT; $phpmailer->Username = SMTP_USER; $phpmailer->Password = SMTP_PASS; $phpmailer->SMTPSecure = SMTP_SECURE; $phpmailer->From = SMTP_FROM; $phpmailer->FromName = SMTP_NAME;
Now that you’ve made these alterations, your WordPress website is set up for SMTP email.
SMTP Test Emails
After configuring your WordPress installation for SMTP use, it’s an excellent idea to send a test email to ensure the SMTP server is correctly integrated. With Easy WP SMTP, this is as simple as heading to the plugins dashboard and navigating to the Test Email tab. Sending a test email after manual configuration requires additional steps and plugin use.
Manual Configuration Test Email
In order to test whether your manual SMTP configuration is successful, you will need to install the WP Test Email plugin. Do this by following the same instructions for SMTP plugin installation, instead searching the add-on store for ‘WP Test Email.’
1. After installation, from your WordPress dashboard, navigate to the Tools tab at the left of the screen and select ‘Test Email.’
2. Then you’ll need to input a recipient email and subject line. Select ‘Save Changes.’
3. After, a message will appear at the top of the screen. This will either tell you that your email has been sent successfully or failed.
If your test email is sent without issue, your WordPress SMTP configuration is running correctly, and the process is complete. However, if WordPress cannot send your test email, ensure all the information you have inputted into the wp-config.php file is accurate. Otherwise, you may need to change your server host or use an SMTP plugin instead of configuring manually.
WordPress SMTP Configuration Summary
After reading this helpful guide, you should have a better understanding of:
- What SMTP is and how it works
- Which free SMTP mailing servers are available
- How to install and configure the Easy WP SMTP plugin
- How to manually configure WordPress for SMTP use
- How to send a WordPress test email
You are now all set to start sending WordPress emails through an SMTP mail server.
WordPress Solutions from Idea Maker
WordPress can sometimes be a challenging platform to get your head around. When it comes to complex configurations, you may find yourself needing assistance. So why not take the burden off your shoulders and have a WordPress site developed by Idea Maker?
At Idea Maker, we have a dedicated team of experts ready to develop high-quality, functional websites that suit your requirements. We offer fully customizable WordPress websites with third-party software integration, meaning there is no end to what your site can achieve. Schedule a free consultation with us today to learn more.