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 extensively explained in this article, sending and receiving emails it is not trivial as they involve different entities such as, for example, sender and recipient including, 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 is essential to understand how WordPress sends emails to find out why it doesn't send them. WordPress has a function called wp_mail to send emails using PHP. This feature uses the site's web server to route and deliver email messages. The most common conceptual mistake that the novice user makes is to believe that a Web server is also a mail server, and that even if it is, a mail server as such can send email a priori for any domain.
Do you think it would make sense that I started sending emails in the name of the president of the United States of America, sending emails with @ whiteouse.gov in the domain name of the email sent? Obviously not. This phenomenon nevertheless happens and is called FAKE MAIL, exploiting the weaknesses of an old protocol for sending mail called SMTP invented in 1981 by that good soul of 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 that you use the plug-in WP Mail SMTP, a beginner-friendly tool that can help improve email delivery.
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 a custom email, i.e. using the classic and always green Simple Mail Transfer Protocol, that is the SMTP protocol.
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 must necessarily install a plugin for SMTP sending which in this case we are dealing with WP Mail SMTP by WPForms.
Install the WordPress WP SMTP plugin and click the button Activate.
Go to Settings of the plugin from the WordPress dashboard and select Generali 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
- 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.
Mailer , select Other SMTP and continue with the section below. Use the information from the email client 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 on 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 Settings plug-in and select the tab Email test. In the box Send to , enter an email address you have access to. Leave the option HTML ACTIVE and click Invia email to finalize 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.