Table of contents of the article:
Sending emails, from contact forms and newsletters to various eCommerce store discounts, to subscribers from a WordPress site is one way to increase engagement. Unfortunately, a common problem faced by WordPress users is that sometimes emails are not sent or end up in spam, ruining all efforts made and putting contacts, communications or advertising campaigns at risk.
As we have already explained in detail in this article, sending and receiving emails is not a trivial matter as it involves various entities such as, for example, the sender and the recipient, between which there are antivirus, antispam, DNSBL lists and much more.
This unfortunately leaves many hypotheses and related many solutions that if you try it without knowledge of the facts and without a good debug, it means wasting days to solve a perhaps simple problem.
In this short guide we will deal with the rather frequent case in which WordPress and its installed plugins do not send and do not deliver outgoing mail, allowing you to solve the problem without being developers or systems engineers, but relying on an excellent plugin.
WordPress does not send outgoing mail
It's essential to understand how WordPress sends emails to figure out why it's not. WordPress has a function called wp_mail for sending emails using PHP. This function uses the site's web server to route and deliver emails. The most common misconception that inexperienced users make is believing that a web server is also a mail server, and that even if it were, a mail server can automatically send emails for any domain.
Do you think it would make sense for me to start sending emails on behalf of the President of the United States of America, sending emails with @whitehouse.gov in the domain name of the sent email? Of course not. This phenomenon, however, happens and is called FAKE MAIL, exploiting the weaknesses of an old email sending protocol called SMTP, invented in 1981 by that good soul Jon Postel.
Precisely to avoid the phenomenon of FAKE MAIL, more or less witty and virtuous mechanisms have been sent such as SPF, DKIM, DMARC, essentially signature systems that significantly increase the authority and trust of the exchanges of email messages.
Once you have this notion and are familiar with the process, it is easier to understand and highlight the reasons why WordPress does not send or does not deliver emails that lead to the following problems:
- Unable to configure the server. Most web hosting companies don't have their servers properly configured to send PHP emails. On WordPress sites that use the default PHP mail function, this causes the problem.
- Poor sender reputation. If you are on a shared IP address, other senders using the same server can affect the delivery of your WordPress emails. If they get a lot of complaints and high bounce rates, it will affect your reputation as well.
- Emails go into spam. Most email providers have dedicated tools to prevent malicious attacks. Unfortunately, WordPress emails can be identified as spam as they are often automated. Furthermore, the PHP mail function is easy for spammers to exploit.
- Plugins. If you're using a contact form plugin like WPForms, check the email address you're using. Your mail server must also be configured correctly.
- Host related issues . Web hosts impose varying limits on the number of emails sent. If you pass them, you will be prevented from submitting any more.
In case you are not sure if your WordPress site is sending email and you want to find out, here are some of the ways to do it:
- Reset password. The quickest way to see if WordPress can send emails is to check if you receive an email after resetting your password.
- Use a contact form plugin. Fill out your site's contact form yourself to test the plugin.
- Check if PHP Mail is enabled. Test your WordPress site using the free plugin Check & Log Email.
Configure SMTP on WordPress with the WP Mail SMTP plugin
Reconfiguring the SMTP server is a popular method for solving WordPress email problems.
It is particularly useful when a customer uses a hosting service from one provider but the mail service from another. It can be easily diagnosed as the mailboxes of the mail clients (Outlook, Mail, Thunderbird for example, but also the Webmail) have no sending and receiving problems; however, messages on the WordPress site are not sent or often end up in SPAM especially on providers such as Gmail, Outlook, Yahoo and Hotmail.
The problem arises from the fact that WordPress is trying to use the PHP mail () function and not an authenticated and authoritative SMTP server for the domain in question and therefore the antispam systems of the mails that are receiving the message deduce (with good reason) that the server where WordPress is installed and from which the email was sent is not authorized to send the message.
In order to avoid technical virtuosity such as the inclusion of the IP in the SPF record of the DNS of the authoritative nameserver for the domain, we want to fall back on a simpler solution, that is to install a plugin like WP SMTP that intercepts outgoing emails from WordPress and sends them with the your e-mail server, as if it were a normal e-mail client.
To do this, we recommend using the WP Mail SMTP plugin , a beginner-friendly tool that can help improve email deliverability.
Also, this method helps to authenticate your email address. With approximately 319 billion emails sent and received every day globally, most email clients seek authentication to avoid malicious messages.
This plug-in helps e-mails to bypass spam tests and firewalls, or rather to comply with them and thus avoid penalties or negative scores on spam filters.
This SMTP plug-in works with various email servers, but each server requires different information for configuration and authentication. For example, a Google user needs their Gmail account client ID to use this plug-in.
For this tutorial, we will focus on setting up a mail server using custom email, that is, using the classic and evergreen Simple Mail Transfer Protocol, aka SMTP.
Therefore, to avoid that our system where the Web server resides is seen as unauthorized, we must configure it as an SMTP client.
To do this we necessarily need to install a plugin for SMTP sending, which in this case we are talking about WP Mail SMTP by WPForms.
Install the WP SMTP WordPress plugin and click the Activate button.
Go to the Plugin Settings from your WordPress dashboard and select General to continue.
Proceed to setup as if you were setting up an email client.
- From e-mail : Enter an existing administrator email address representing the
your website. - Force from the email - Keep this checked to prevent other plugins like contact forms from changing this email configuration.
- From Nome - Use a name that represents the
your website, for example its title. - Strength by name - Prevents other plugins from changing the name by keeping the box checked.
- Return route - Indicates that non-delivery receipts or bounce messages will be returned to the same email as From e-mail . We recommend checking this box to know when WordPress is not sending emails.
For Mailer , select Other SMTP and continue with the section below. Use the information from your email client's configuration settings:
You can retrieve these settings as they are from your e-mail client (OutLook, Mail, Thunderbird, etc ...) if you already have an e-mail that works correctly, that is, that sends and distributes e-mail correctly without spam problems.
- SMTP Host - Copy and paste your email host's outgoing SMTP server information.
- Cryptography : use the SMTP server information. If the server provides information Secure Sockets Layer (SSL) , select SSL. If the server provides details on Transport Layer Security (TLS) , choose this option.
- SMTP port : insert 465 for SSL and 587 for TLS.
- Strong : keep it turned on to authenticate your email.
- SMTP username : Check the SMTP username from the server.
- SMTP password : Use the SMTP server password.
Click Save Settings to complete the setup.
Now the most is done, it remains only to do a test to make sure that everything is working correctly.
Go to the plugin settings and select the Test Email tab. In the Send to box , enter an email address you have access to. Leave the HTML option ON and click Send Email to complete the process.
Check your inbox to verify that the test email is there. Also, make sure the email goes to your inbox and not spam.
