Why does my form not send email?

Email & Webmail | Updated 2026

Contact forms are one of the most common features on websites, and "my form is not sending email" is one of the most common support questions we receive. The problem is almost never the server. Here are the actual causes and how to fix them.

01. Check Your Spam Folder First

Before troubleshooting anything else, check your spam or junk folder. Form submissions sent via PHP mail() are frequently caught by spam filters because they lack proper authentication headers. If you find the emails in spam, the fix is to switch to SMTP (covered in section 03).

Also check that the "To" address in your form configuration is correct. A typo in the recipient email address is more common than you might expect.

02. PHP mail() Function Issues

Most contact form plugins and custom PHP forms use the PHP mail() function by default. This function hands the email off to the server's local mail system (Exim on our servers) for delivery. It works, but it has limitations:

  • No authentication - The email is sent from the server without proving who the sender is. Receiving servers increasingly reject or spam-filter unauthenticated mail.
  • Generic headers - The From address, Return-Path, and other headers may not match your domain, triggering SPF failures.
  • No delivery feedback - mail() returns true if the email was accepted by the local mail queue, but you have no way to know if it was actually delivered.

If your form was working and suddenly stopped, check your account's error_log file in public_html for PHP errors. Also check cPanel > Email > Track Delivery to see if the server attempted to send the message and what happened.

03. Use SMTP Instead of PHP mail()

The best fix for form email problems is to bypass mail() entirely and send through your actual email account using SMTP. This authenticates the sender, adds proper headers, and dramatically improves deliverability.

For WordPress

Install the WP Mail SMTP plugin (or FluentSMTP, Post SMTP, or similar) and configure it with your hosting email credentials:

  • SMTP Host: mail.yourdomain.com
  • SMTP Port: 465
  • Encryption: SSL
  • Authentication: On
  • Username: A real email account on your domain (e.g., forms@yourdomain.com)
  • Password: That account's password

Most SMTP plugins include a "Send Test Email" feature. Use it to verify everything works before relying on it for your contact form.

Tip

Create a dedicated email account in cPanel specifically for your form submissions, like forms@yourdomain.com or noreply@yourdomain.com. This keeps form traffic separate from your personal email and makes it easy to track deliverability.

For Custom PHP Scripts

Use the PHPMailer library instead of mail(). PHPMailer supports SMTP authentication and is already available on most hosting accounts. Here is a minimal example:

<?php
use PHPMailer\PHPMailer\PHPMailer;
require 'vendor/autoload.php';

$mail = new PHPMailer(true);
$mail->isSMTP();
$mail->Host = 'mail.yourdomain.com';
$mail->SMTPAuth = true;
$mail->Username = 'forms@yourdomain.com';
$mail->Password = 'your-email-password';
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;

$mail->setFrom('forms@yourdomain.com', 'Your Site Name');
$mail->addAddress('you@yourdomain.com');
$mail->Subject = 'Contact Form Submission';
$mail->Body = 'Message content here';

$mail->send();
?>

04. The "From" Address Problem

A very common issue: your form sets the "From" address to the visitor's email address (the person filling out the form). This causes SPF failures because the email is being sent from your server but claims to be from gmail.com, yahoo.com, or wherever the visitor's email lives. The receiving server checks SPF records and sees that your server is not authorized to send email for gmail.com, so it rejects the message.

The fix: always set the "From" address to an email account on your own domain. Put the visitor's email in the "Reply-To" header instead. This way, when you hit reply, your email client will address the reply to the visitor, but the SPF check passes because the From address matches your domain.

Important

Never set the From address to the form submitter's email. Use your own domain's email as From and set Reply-To to the submitter's address. This is the single most common cause of form emails being silently dropped.

05. WordPress Contact Form Troubleshooting

If you use Contact Form 7, WPForms, Gravity Forms, or Ninja Forms:

  • Install an SMTP plugin (section 03) - This fixes 90% of WordPress form email issues.
  • Check the form's "From" setting - Set it to an address on your domain, not {your-email} which uses the submitter's address.
  • Check spam protection - If you use reCAPTCHA or Akismet, make sure the keys are valid. Expired keys can silently block form submissions.
  • Check the form's mail tab - In Contact Form 7, go to the form's "Mail" tab and verify all fields are correct. Look for red warning icons.
  • Test with a simple form first - Create a basic form with just a name and email field to rule out complexity issues.

06. Custom PHP Form Scripts

If you wrote your own form handler in PHP:

  • Check error_log - Look in public_html/error_log for PHP errors that might be preventing the script from executing.
  • Verify the script runs at all - Add error_log("Form submitted"); at the top of your handler and check the log after submitting.
  • Check form action URL - Make sure the form's action attribute points to the correct PHP file.
  • Check for disabled functions - On shared hosting, some PHP functions are disabled for security. See PHP system/exec Functions Disabled. The mail() function itself is not disabled, but if your script calls exec() or system() for some reason, those will fail.
  • Switch to PHPMailer - Replace mail() with PHPMailer for authenticated SMTP sending (see section 03).

Form Still Not Sending?

If you have tried SMTP configuration and the email still is not arriving, open a ticket and tell us your domain, which form plugin you use, and whether you see any errors in Track Delivery.

Open a Support Ticket

Quick Recap

  1. Check spam first - Form emails often land in junk folders
  2. Use SMTP, not PHP mail() - Install WP Mail SMTP or use PHPMailer with your email credentials
  3. Set "From" to your own domain - Never use the submitter's email as the From address
  4. Put the visitor's email in Reply-To - So replies go to the right person
  5. Test with the SMTP plugin's test email feature - Verify delivery before relying on it

Helping users fix contact form email delivery · Last updated March 2026 · Browse all Email articles

  • 625 Users Found This Useful

Was this answer helpful?

Related Articles

Email Troubleshooting Guide

Email & Webmail | Updated March 2026 Email problems are the most common support...

Outlook: Your POP3 Server Has Not Responded or TCP-IP Error

Email | Updated 2026 Quick Answer This error means Outlook could not reach the mail...

Greatly Reduce SPAM

Email & Webmail | Updated 2026 Spam is an unavoidable part of running email, but you can...

Setting Up Email on a Galaxy Device

Updated 2026 Quick Answer Samsung Galaxy devices use the standard Android email setup....

Emails Bouncing Back

Email & Webmail | Updated March 2026 When an email bounces, you receive a delivery...



Save 30% on web hosting - Use coupon code Hosting30