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 you 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, the 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 the 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 the 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 the 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.
How To Fix WordPress Contact Form Not Sending Email?
I had also had an issue where I noticed I had not received any messages from my contact form or email notifications from my site, like when a new comment is posted, for a long time.
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 a problem with contact form or the 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 were no missing emails on the server email account, and hosting support told me that there are no issues from their end.
I started to suspect that the PHP mail function is the culprit and that now is time to implement SMTP to send emails in WordPress. You will find many tutorials for setting SMTP using Gmail, Yahoo, SendGrid, etc.
But Google often changes its security settings, Yahoo I don’t use, and though SendGrid is a good option, I am using free plan so not to surpass my monthly free quota it was best option to set up SMTP through my hosting server.
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 instead you can use the same plugin mentioned below.
Contact Form Not Sending Email
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 go to WP Mail SMTP and then to 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.
Plugin in the free version offers you options to set to send emails using Gmail, Mailgun, SendGrid or other SMTP.
In PRO version you also have options to use Microsoft SMTP (Outlook.com and Office 365) and Amazon SES SMTP.
In addition to native Microsoft and Amazon SES integrations, WP Mail SMTP Pro provides access to many other powerful features and services like:
- EMAIL LOG – lets you log and view all emails sent from your site.
- EMAIL CONTROLS – you can disable different WordPress notification emails.
- WHITE GLOVE SETUP – includes WP Mail SMTP plugin installation and setup, configuration adjustments to your DNS for proper email domain name verification, Mailgun setup, and final testing to confirm everything works.
For purposes of this tutorial, I choose Other SMTP. You can choose any other. For SendGrid, for example, you will only need SendGrid API key.
Under the SMTP options section, fill out your SMTP host and port information you obtained from your hosting provider. For encryption method, select SSL or TLS. The plugin will need your login credentials to send out emails.
Enable the authentication feature and provide your SMTP login details. This is usually your cPanel login info. Next, click on the Save Settings button to store your settings. The settings page will now reload, and you will see the ‘Settings saved’ message.
There is Email Test feature in plugin options to check if you have set up everything correctly.
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 correctly, 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 a 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.