June 16 2022

How to fix WordPress not sending emails?

Let's see how to solve the sending of emails from WordPress through the use of an authenticated SMTP Server.

WP Mail SMTP Pro WordPress Plugin

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.

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.

WP SMTP Plugin

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

 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.

 

 

Do you have doubts? Don't know where to start? Contact us!

We have all the answers to your questions to help you make the right choice.

Chat with us

Chat directly with our presales support.

0256569681

Contact us by phone during office hours 9:30 - 19:30

Contact us online

Open a request directly in the contact area.

INFORMATION

Managed Server Srl is a leading Italian player in providing advanced GNU/Linux system solutions oriented towards high performance. With a low-cost and predictable subscription model, we ensure that our customers have access to advanced technologies in hosting, dedicated servers and cloud services. In addition to this, we offer systems consultancy on Linux systems and specialized maintenance in DBMS, IT Security, Cloud and much more. We stand out for our expertise in hosting leading Open Source CMS such as WordPress, WooCommerce, Drupal, Prestashop, Joomla, OpenCart and Magento, supported by a high-level support and consultancy service suitable for Public Administration, SMEs and any size.

Red Hat, Inc. owns the rights to Red Hat®, RHEL®, RedHat Linux®, and CentOS®; AlmaLinux™ is a trademark of AlmaLinux OS Foundation; Rocky Linux® is a registered trademark of the Rocky Linux Foundation; SUSE® is a registered trademark of SUSE LLC; Canonical Ltd. owns the rights to Ubuntu®; Software in the Public Interest, Inc. holds the rights to Debian®; Linus Torvalds owns the rights to Linux®; FreeBSD® is a registered trademark of The FreeBSD Foundation; NetBSD® is a registered trademark of The NetBSD Foundation; OpenBSD® is a registered trademark of Theo de Raadt. Oracle Corporation owns the rights to Oracle®, MySQL®, and MyRocks®; Percona® is a registered trademark of Percona LLC; MariaDB® is a registered trademark of MariaDB Corporation Ab; REDIS® is a registered trademark of Redis Labs Ltd. F5 Networks, Inc. owns the rights to NGINX® and NGINX Plus®; Varnish® is a registered trademark of Varnish Software AB. Adobe Inc. holds the rights to Magento®; PrestaShop® is a registered trademark of PrestaShop SA; OpenCart® is a registered trademark of OpenCart Limited. Automattic Inc. owns the rights to WordPress®, WooCommerce®, and JetPack®; Open Source Matters, Inc. owns the rights to Joomla®; Dries Buytaert holds the rights to Drupal®. Amazon Web Services, Inc. holds the rights to AWS®; Google LLC holds the rights to Google Cloud™ and Chrome™; Facebook, Inc. owns the rights to Facebook®; Microsoft Corporation holds the rights to Microsoft®, Azure®, and Internet Explorer®; Mozilla Foundation owns the rights to Firefox®. Apache® is a registered trademark of The Apache Software Foundation; PHP® is a registered trademark of the PHP Group. CloudFlare® is a registered trademark of Cloudflare, Inc.; NETSCOUT® is a registered trademark of NETSCOUT Systems Inc.; ElasticSearch®, LogStash®, and Kibana® are registered trademarks of Elastic NV This site is not affiliated, sponsored, or otherwise associated with any of the entities mentioned above and does not represent any of these entities in any way. All rights to the brands and product names mentioned are the property of their respective copyright holders. Any other trademarks mentioned belong to their registrants. MANAGED SERVER® is a registered trademark at European level by MANAGED SERVER SRL Via Enzo Ferrari, 9 62012 Civitanova Marche (MC) Italy.

Back to top