Not sending WordPress emails ? How to fix the WordPress not sending email issue ?
Fixing the problem of sending emails in WordPress is one of the topics that can occur for any WordPress website and there are times when everything you do to get your emails to the recipients of the site is not sent and you cannot send your emails to your recipients in any way.
This story does not end here and can occur in cases such as not sending an email when registering in WordPress, not sending an email when posting a comment on the site and not sending an email when sending a contact form in WordPress and website admin also does not receive any email from WordPress .
So, in this tutorial from Nirwp.com knowledge base, I am going to first address the issue of why our emails are not sent in WordPress at all? And then I will introduce alternative solutions that you can use to safely send your emails in WordPress to users, so stay tuned until the end.
As you know, WordPress uses the mail() function in php language to send e-mail. If this function is not active on hosts, for any reason, virtually no e-mail will be sent to recipients by WordPress, so it is necessary to make sure that this function is active on the host and works properly; On the other hand, sometimes your emails are sent correctly and there is no problem with the php email function, but for various reasons, your email is detected as spam by email servers, and in this case, the emails are usually sent to the spam folder.
So, we see that in general, we have two problems for not sending emails in WordPress, in general, either emails are not sent or emails are sent, but because your email is known as spam, every email you send will go to the spam folder. The only way to solve this problem is for many people to register your e-mail as not spam so that e-mail servers do not consider your e-mail as spam and the e-mails enter the users’ inbox correctly.
So, according to the explanation above, in the first step, you should contact the management of your host and ask them to check the problem of email not being sent on the host, and if your host has a problem with the php email function, fix it so that it would be possible to send email to you.
But to solve the problem of WordPress not sending email, the best solution would be to use a method to send an intermediary email. It means that you can use sites that can send your emails to users by placing an API. Maybe now you ask yourself what advantages such a solution can have? In response to this question, the following points can be mentioned:
So we can see that sending emails as an intermediary will be better for our site and we will have full confidence that the emails reach the users in the inbox 100%. Therefore, to set up an intermediary service, you can use the solution that we will discuss further.
“ WP Mail SMTP by WPForms ” plugin is easier to work with, according to the idea of the most users. Because the values of the fields are filled automatically.
The “Easy WP SMTP” plugin is more compatible with the content management system from the users’ point of view.
Fixing the problem of sending emails in WordPress is not very hard believe me!
In the following, we will give a detailed description of both plugins and how to use each one.
One of the quick ways to solve the problem of not sending emails in the WordPress content management system is to use the “WP Mail SMTP” plugin. So far, this plugin has more than one million active installations and has been able to register a score of 4.3 out of 5 in the WordPress repository. The remarkable thing about this plugin is its simplicity and ease of use. Because by selecting the desired options, the fields related to that option are automatically set, and you no longer need to look for specialized settings and port numbers.
To start working, first refer to your WordPress dashboard with the help of the tutorial on how to enter the WordPress administration. Then follow the steps below:
If you search for a plugin: you will see many plugins in this list that have almost the same function. Find the WP Mail SMTP by WPForms plugin from the list. Click the “Install Now” button to start installing the plugin. After that, a button titled “Active” will be displayed. Click on it to activate the plugin.
After installing and activating the plugin, a new menu under the title will be added to your WordPress dashboard
“wp mail smtp by wpforms” plugin settings
From the WordPress menu, go to the email menu and the settings sub-menu. You will come across a page that has two headers as follows, which will be explained in detail below:
In the general tab, apply your settings based on the following description:
Sender’s email: Enter the address you want to send and receive emails in this field. (Email registered in the hosting services)
Sender Name: Enter the name you want the recipient to see.
Return path: If the sent emails encounter problems or are returned for any reason, you will receive a report from them. If you want, put the engine in active mode.
E-mail sender: In this section, click on the e-mail sender service of your choice. which is set to default (none). In the basic mode or php mail, the default mode of the server is used. But the important point here is that the sender wants the recipient to see the correct email address of the collection, not the server address! Therefore, we choose the next suggested option, that is, other SMTPs.
By selecting the other SMTP sender mode, the settings of this section will be as follows:
Now click on the Save Settings button at the bottom of the page.
Checking the status of not sending emails from the host
Well, so far, we have only completed the basic settings and configuration necessary to solve email problems in WordPress. To make sure that the settings are applied correctly and the emails are sent correctly, we use the email test header.
If you run into the “Test plain text email was sent successfully!” message, It means that the email sending and receiving system is working correctly and this plugin is running without any problems. Also, if you check your inbox, you will see this test email.
If you encounter “There was a problem while sending the test email”, it means that there is a problem in sending the email. In most cases, the problem is solved by checking the email and password.
If this plugin does not solve the problem of sending emails in WordPress, you can also use the Easy WP SMTP plugin. The mentioned plugin is much more compatible than WP Mail SMTP by WPForms.
Easy WP SMTP is another very popular and used plugin to solve the problem of email not being sent among WordPress users. So far, this plugin has registered more than 400,000 active installs with a rating of 4.3 out of 5 in the WordPress repository. The positive and important thing about this plugin is its compatibility with different services, although its settings are also more specialized.
To install and configure the plugin, log in to your content management system by learning how to log in to WordPress administration, then:
Find the Easy WP SMTP plugin and click the “Install Now” button next to it. After installing the plugin, click on the “Activate” button that appears next to it.
After installing and configuring the plugin, a new sub-menu titled Easy WP SMTP will be added to the settings section of your WordPress dashboard. Click on it to be redirected to plugin configuration section.
Note: If you are not familiar with installing plugins in WordPress, you can use the tutorial on how to install and work with plugins in WordPress and install and activate the desired plugin.
Email sending with smtp plugin settings
Now, as you can see in the image below and in the settings of the Easy WP SMTP plugin, customize the configuration of each section based on the description provided below.
A little lower we reach the settings related to our email, which must be customized according to the following description:
Now save the settings. Go to the TEST EMAIL tab and send a test email.
To send a test email, in the “To” field, send the address of the recipient of the email so that the email will be sent to him through WordPress SMTP, and then in the Subject field, enter the title of your email, and finally, in the Message field, enter the text of your email and click the “Send Test Email” button.
If the settings are correct, you will see a message similar to the image above.
Note: Be careful not to use words like “test” in the subject field because it will be considered spam.
From now on, every email you send in WordPress will be sent through SMTP without any problems, and you will be at ease about receiving emails.
Fixing the problem of not sending emails in XAMPP localhost
One of the problems that users encounter when designing a website is that they cannot send emails when using localhost. Therefore, the use of these plugins can solve the problem of not sending emails on the localhost, so that they can fully implement their site on the localhost and finally transfer it to the host. But there is a problem in the XAMPP localhost program that you can’t send emails using this plugin.
Because in XAMPP ‘s localhost program, php functions are used to send email, these functions only work in the 32-bit version of Windows, and you will be able to send email in localhost. But people who use the 64-bit version of Windows will not be able to send e-mail on localhost in this way. Therefore, it is better to use another plugin that will allow you to send emails. A plugin that will enable sending email on localhost for all versions of Windows is registered in the WordPress repository with the name wp mail smtp. To use this plugin, you can use the tutorial on how to fix the problem of not sending email on localhost XAMPP. Be careful that in order to be able to send an email, you need to send an email using the Google API.