Skip to content

Contact form not sending emails: how to receive them

Medium 20 min Updated:

Quick answer

If the contact form is not sending emails, the most common culprit is incorrect sending via the PHP mail() function or lack of SMTP authentication. First check the spam folder and logs, then set up an SMTP plugin with authentication, and finally check DNS records (SPF, DKIM, DMARC).

How to recognize the problem

  • Messages from the contact form are not arriving in your email
  • Users report they did not receive a reply
  • Emails end up in the spam folder
  • The form shows a success message, but the email does not arrive
  • Error "Could not instantiate mail function" or similar

Most common causes

PHP mail() function is not working

Many hosting providers block or restrict the PHP mail() function, so messages are not sent. This is the most common cause.

Lack of SMTP authentication

Without SMTP authentication, email servers often reject messages or mark them as spam. Setting up SMTP solves the problem.

Incorrect recipient email address

The form settings may contain a wrong or non-existent address. Check the "To" field in the plugin settings.

Spam filters on the recipient side

Messages may be filtered as spam due to missing SPF, DKIM or DMARC records. Check the spam folder and filter settings.

Conflict with other plugins

Some security or caching plugins can block email sending. Temporarily disable them and test.

Step-by-step fix

  1. 1

    Check the spam folder and logs

    First log in to the recipient's email account and check the spam and junk folders. If you have access to server logs, look for errors related to mail() or SMTP. In WordPress, you can install an email logging plugin (e.g. WP Mail Logging) to see if messages were sent at all.

  2. 2

    Test sending via PHP mail()

    Install the "Check & Log Email" or "WP Mail SMTP" plugin and, if necessary, configure it to use PHP mail() as the sending method. Send a test email. If the message does not arrive, the PHP mail() function is probably blocked or not working correctly. Most hosting providers offer an SMTP account with authentication that should be used.

  3. 3

    Set up the SMTP plugin

    Install and activate the WP Mail SMTP plugin or similar. In the settings, select "Other SMTP" and enter the details provided by your hosting: host (e.g. mail.yourdomain.com), port (587 for TLS or 465 for SSL), username and password. Save and send a test email.

  4. 4

    Check the contact form settings

    In the contact form plugin settings (e.g. Contact Form 7, WPForms), check that the recipient email address is correct. In Contact Form 7, this is the "To" field in the "Mail" tab. Make sure there are no typos and that the recipient's domain accepts mail.

  5. 5

    Check SPF, DKIM and DMARC records

    These DNS records improve deliverability. The SPF record should include the server through which you send emails (e.g. v=spf1 include:_spf.google.com ~all). DKIM and DMARC are often set up through the hosting panel or SMTP service. Check them with a tool such as MXToolbox.

  6. 6

    Disable security and caching plugins

    Temporarily deactivate security plugins (e.g. Wordfence) and caching plugins. Then send a test message. If it works, reactivate the plugins one by one to find the culprit.

  7. 7

    Check if the hosting is blocking sending

    Some hosting providers block port 25 or require you to use their SMTP. Contact hosting support and ask which SMTP parameters to use. Often it is enough to use their server.

  8. 8

    Install a plugin for alternative sending

    If nothing helps, install a plugin such as "Post SMTP" or "FluentSMTP" that offer more advanced options and logging. Configure according to the instructions and test.

If nothing helps

If you have tried all the steps and emails still do not arrive, contact your hosting provider with details: the exact time of sending, the sender and recipient addresses, and any errors from the logs. Check if the recipient's domain has strict spam filters (e.g. Microsoft 365 or Google Workspace) and ask the recipient to whitelist your address. Also, consider using a specialized transactional email service (e.g. SendGrid, Mailgun) that has a better reputation and deliverability. Always test sending to multiple addresses (Gmail, Outlook, Yahoo) to see if the problem is global or specific to one recipient.

How to prevent it

  • Regularly update WordPress, plugins and theme
  • Use SMTP authentication instead of PHP mail()
  • Set up SPF, DKIM and DMARC records
  • Periodically test the contact form

When to call a professional

If you cannot access the hosting panel, do not know how to set up DNS records, or suspect a more serious server problem, contact IT support.

Website development · Fast, SEO-ready, multilingual websites

FAQ

Why do messages from the contact form end up in spam?

Most often due to missing SPF, DKIM or DMARC records, or because the server sends without authentication. Set up SMTP and DNS records to improve domain reputation.

How do I know if the problem is in WordPress or on the server?

Send a test email via the SMTP plugin. If it does not arrive, the problem is on the server or in the network. If it arrives, the problem is in the form or plugin settings.

Is it safe to use the PHP mail() function?

PHP mail() has no authentication and can easily be abused. SMTP with authentication is recommended, as it is safer and more reliable.

Share
Didn't find a fix?The AI IT assistant is available 24/7. Describe the problem or send a screenshot of the error and get instructions for your case.Ask the AI IT assistant