WordPress contact form not sending email is a common issue that happens to WordPress website owners. Are you not receiving email notifications from your WordPress contact forms?
Missing WordPress registration notifications? No new comment notifications?
As you may know, WordPress can send emails to inform about new comments, registrations, updates, contact form entries, etc.
By default, WordPress uses the PHP mail function to send emails generated by WordPress or any contact plugin like Contact Form 7.
However, PHP mail function is not the best approach and may decrease email deliverability. Due to the nature of PHP Mail function, emails often arrive in spam or junk folder.
There is also a good chance that emails sent to popular email providers (gmail.com, hotmail.com, etc.) will be blocked before even reaching the recipient.
To avoid abuse, some hosting companies apply strict limitations or even completely disable PHP Mail function.
Another common cause is that many email service providers use a variety of tools to reduce email spam.
These tools often try to detect if an email is originating from the location it claims to be originating from. These settings will limit and affect emails sent out by your WordPress site.
This is why it is recommended to use SMTP (Simple Mail Transfer Protocol) to send emails in WordPress. Unlike PHP mail function, SMTP increases email deliverability by using proper authentication.
If SMTP server is configured correctly by your hosting provider, there is a smaller chance email will end up in spam or junk folder.
Therefore, it helps to improve email deliverability. In this tutorial, you will learn how to configure WordPress to send emails using your hosting provider’s SMTP server.
Before proceeding, make sure SMTP is supported by your hosting provider. Below example is based on InMotion hosting which I use and the process should be similar on other hosting providers who use cPanel.
I noticed that lately, I am not receiving notifications from WordPress and messages from the contact form.
It was very strange to me as daily I receive at least several messages through the contact form on the site. It was evident that something is not right and testing contact form confirmed my suspicions.
It was either problem with contact form or PHP mail function. I contacted my hosting provider support and checked my emails through cPanel.
A few weeks ago everything was fine, and now emails don’t arrive. There was no missing emails on server email account and hosting support told me that there are no issues from their end.
I started to suspect that PHP mail function is the issue and that it is time to start using SMTP to send emails in WordPress.
My newsletter is sent using MailPoet but through SendGrid SMTP via API. So it was the right time to configure SMTP for the whole site.
I was lazy to do it for very long time. So I just placed the email in contact form page and wrote that contact form doesn’t work and anyone interested should send me an email.
Not very professional. I know. Don’t be like me. Finally, I decided to fix WordPress contact form not sending emails issue once and for all.
You will find many tutorials for setting SMTP using Gmail, Yahoo, SendGrid, etc. I also first tried it that way, but Google often changes its security settings, Yahoo I don’t use, and I didn’t manage to get SendGrid working.
Then I remembered. Why not use the server. I have already paid it. Why not get most of it. Below you will find WordPress contact form not sending email fix using SMTP server.
If you want to use Google, Yahoo, SendGrid, Mandrill or any other SMTP, you will need to look for guide elsewhere.
How to Fix WordPress Contact Form Not Sending Email?
Most WordPress hosting providers offer email service for each domain you host with them.
This means you can create email accounts with your own domain name like firstname.lastname@example.org.
First, you will need to create an email account. In this example, I will show how to create an email account in cPanel.
Your hosting service provider may use some other account management system, but the basic process is the same on most hosting providers.
Log into your hosting account, and click on email accounts under the Mail section.
This will show you a simple form where you need to fill out the information required to create an email account.
After creating your email account, you are now ready to use it in WordPress. But before you do that, you will need some information from your hosting service provider.
You need SMTP Host for your email address and SMTP Port for secure login. You can find it by clicking on Webmail under Mail tab in cPanel.
Then click “Login in to Webmail” and then Configure Mail Client.
You need what is under Manual Settings for Outgoing Server and Secure SSL/TLS Settings.
You can also ask your hosting support about this information if you don’t know or can’t find it.
After creating an account, you will now need to install and activate the WP Mail SMTP plugin.
Upon activation visit Settings » Email to configure the plugin settings.
First, you need to enter the email address you just created. After that, you can add a from name. If you do not add a from name, then the plugin will use the default WordPress.
Make sure that the ‘Send all WordPress emails via SMTP’ option is checked.
Under the SMTP options section, fill out your SMTP host and port information you obtained from your hosting provider or info under Manual Settings for Outgoing Server and Secure SSL/TLS Settings.
For encryption method, you need to select SSL for encryption. The plugin will need your login credentials to send out emails.
Under the authentication section, check ‘Yes: Use SMTP authentication’ option and provide your SMTP login details. This is usually your cPanel login info.
Next, click on the save changes button to store your settings. The settings page will now reload, and you will see the ‘Settings saved’ message.
WP Mail SMTP comes with an email testing tool. After saving your settings, scroll down to the bottom of the page and enter your email address to send a test email.
WP Mail SMTP will send a test message to the email address you provided. If you do not receive the test message, then this means you didn’t configure correctly.
The most common reason for errors in sending emails using SMTP is incorrect SMTP host or port.
Make sure that you are entering the correct host and port settings provided by your hosting provider.
Make sure that you select the right encryption method. Usually, SSL works on most environments but check it with your web host if your emails are not getting delivered.
PROS and CONS of Using Your Web Host’s Mail Servers for WordPress Emails
The most obvious advantage is that you can use your own branded email address for outgoing emails in WordPress.
Another advantage is that you have already paid for this service when signing up for your hosting account.
You will not need to pay any extra money for sending and receiving emails like you would need to pay for using SendGrid or Mandrill.
However, some WordPress hosting providers enforce limitations on outgoing emails. This is why it is not recommended using WordPress to send newsletter emails.
Another common problem with shared hosting providers is that their mail servers can be unreliable.
If you notice delays in email delivery, then you should consider using third-party email services like Google Apps for Work, Mandrill, or SendGrid.
WordPress Contact Form Not Sending Email Summary
WordPress uses mail function in PHP to send emails. Many shared hosting providers do not have this function configured properly, or they have disabled it entirely to avoid abuse.
In either case, your WordPress emails will not be delivered.
The alternate solution is to use a third party email service to send out your emails. You can use services like Mandrill, Google Apps for work, or Sendgrid.
You will have to pay for your account, and the cost will vary depending on how many users you add or the number of emails you send.
Utilizing your WordPress hosting provider email service is cost effective, reliable and straightforward way to use SMTP and be sure your emails will be sent and that you will receive messages from contact form from your site visitors.
Let me know if you know a better way or if you have any questions regarding this topic.