WordPress email form: resolving issues with emails not being delivered

WordPress dashboard with a secure email on its way to an inbox.
Rate this post

The problem of the WordPress email form The fact that they do not arrive can prevent quote requests, appointments and business enquiries from going through. The contact form appears to be working: the user sees the confirmation message, but nothing appears in the recipient’s inbox.

In most cases, the problem is not caused by the form builder. Before replacing plugins or rebuilding the website, check the configuration, the sender’s address and the SMTP setup.

Key points

  • A confirmation message from the contact form does not prove that the email has been delivered: check the recipient, sender, ‘Reply-To’ field, spam folder and sending logs.
  • Set the sender to an address on your domain and use the visitor’s email address only in the ‘Reply-To’ field, to avoid any potential rejection due to spoofing.
  • Connect WordPress to an authenticated SMTP server and use Mailtrap to check delivery before carrying out tests with real recipients.
  • Check the SPF, DKIM, DMARC and MX DNS records, as well as the anti-spam measures and data protection for the data collected by the form.
  • Before replacing the plugin or creating a custom form, check the module’s configuration, email delivery and that the mobile test is working correctly.

Can you work out where the transmission breaks down?

Before changing the settings, carry out a test submission by filling in the contact form as you would as a normal visitor. To isolate the delivery process, also use a sandbox service such as Mailtrap, without treating it as a production solution. Check what happens at each stage:

  • the submit button responds;
  • any error messages appear;
  • the confirmation page appears;
  • the notification arrives in the correct inbox;
  • the message ends up in the spam folder;
  • The submission is recorded in the plugin’s database, where applicable, for example with WPForms.

If the form does not submit, the problem may lie with the form builder. Check for JavaScript errors, the configuration and the validation of required fields. It may also be due to a conflict between plugins or a security-related block. If Mailtrap receives the message, the form is sending it correctly, but the test does not confirm delivery in production.

If the form is submitted but the message does not arrive, you need to focus on the delivery process and check whether the email has actually been delivered.

WordPress normally uses the function wp_mail(), linked to the server’s email system. It is not a full-featured email service and often does not use SMTP. Some hosting providers restrict it or configure it incorrectly. For authenticated delivery, it is best to use SMTP. Messages may be rejected by the receiving servers because they lack authentication.

A confirmation message in the browser indicates that the form has received the data. It does not indicate that the email has been delivered.

Set up the contact form correctly

WPForms and Contact Form 7 are two popular solutions for creating a form without having to write any code. WPForms offers a drag-and-drop visual editor. The other solution uses a form builder based on fields and shortcodes – that is, code that you copy into the page.

Once you’ve chosen a WordPress plugin, go to Plugins > Add New, search for the product name, including Contact Form 7, install it and activate it. Using WPForms, define the form fields for name, email, telephone number and message. Set validation for the required fields and assign a clear label to the submit button. For the code-based form, copy the generated shortcode and save it for insertion.

The section that causes the most errors is the ‘Notifications’ tab.

With WPForms, you can create Settings > Notifications To manage email notifications and verification:

  • the address to which the message should be sent;
  • email subject line;
  • dynamic fields accessed via smart tags;
  • address used as the sender’s address;
  • the address entered in the ‘Reply-To’ field.

In Contact Form 7, go to Contact > Contact forms > Email and enter the sender details here. The “From” field must use an address from your domain, for example info@azienda.it. The email address entered by the visitor should be placed in the “Reply-To” field, not the “From” field.

When choosing a contact form plugin, make sure it correctly separates the sender and the ‘Reply-To’ address. Using the visitor’s email address as the sender may seem natural, but servers may interpret this as spoofing and reject the message. A Guide to Contact Form 7 issues It can help you spot the most common configuration errors.

With WPForms, you can insert the contact form into the Gutenberg editor using the dedicated block. With Contact Form 7, copy the relevant shortcode and paste it into the page.

The shortcode is an alternative to the Gutenberg Shortcode block. If the module does not appear, check the shortcode for any syntax errors.

To embed the content on a different page, insert the shortcode into the content of the new page. You should also check the positioning of the shortcode after publication.

Check in Gutenberg that the block is compatible with the theme. Relaunch Gutenberg after publishing and check the preview.

Finally, send a test message from WPForms and check for the notification in the recipient’s inbox. In WPForms, also check the result after publication. If everything is correct but the notification does not arrive, SMTP is the next thing to check.

A monitor with a clean interface, showing a contact module on a dark desk.

SMTP: the most reliable solution for WordPress email forms

The most effective solution is to connect WordPress to SMTP, i.e. to an email service authenticated via an authorised server. The system uses the credentials and settings defined by the provider, but does not correct the configuration of the form fields.

Install and activate the plugin, then open WP Mail SMTP > Settings to choose an email service provider. The selected email service provider is also compatible with WPForms. The available options often include Gmail, Outlook, Microsoft 365, Brevo, SendGrid, Mailgun or a custom server.

To narrow down the diagnosis, use the Mailtrap sandbox. This environment separates testing from production. Mailtrap does not replace the actual provider when the email is finally sent.

The workflow is simple:

  1. Complete the activation of the plugin.
  2. Choose the provider you’ll use for WPForms notifications.
  3. Use Mailtrap’s SMTP credentials.
  4. Then enter the host and port provided by Mailtrap, the encryption method, and your username and password or key.
  5. Set a sender address belonging to the domain.
  6. Save the settings and start Test Email to send the message to Mailtrap.

Check that the message appears in the Mailtrap inbox.

For a production mailing, an SMTP configuration for Brevo can use smtp-relay.brevo.com, port 587 and TLS; Microsoft 365 often uses smtp.office365.com on port 587. Do not copy generic settings: always check the provider’s documentation and authorisation.

Make sure you use the same address in the plugin settings and in WPForms. This ensures that the sender address provided by the form matches the one used for dispatch.

Check the sender displayed in Mailtrap. Also check the ‘Reply-To’ field in the same Mailtrap inbox. Finally, examine the message body and headers in Mailtrap.

A web developer working on a laptop in a dark room with red lighting.

The SMTP test must be carried out before the form test. If the test message appears in your inbox, then carry out a form test in WPForms. The delivery remains unaffected by how the form is embedded, even when using a shortcode.

This procedure applies to a contact form and to Contact Form 7. Then compare the result with a message sent by the actual provider, not Mailtrap. If Mailtrap receives the message but the actual recipient receives nothing, the problem is likely to be with the actual provider’s email delivery. Correct the sender address, the ‘Reply-To’ field or the parameters specified by the provider, then repeat the test in Mailtrap.

For a further step-by-step guide, please refer to this guide at How to set up WordPress emails. The point remains the same: check the transport first, then the form.

Spam, DNS and data protection

A successful send does not mean that the message will arrive in the inbox. Please also check your spam folder and the domain’s reputation.

For an initial technical check, use Mailtrap as a test inbox. It does not replace the domain’s DNS configuration and does not guarantee that emails will reach the main inbox.

Check the domain’s DNS for the following records:

  • SPF, to specify which servers are authorised to send emails;
  • DKIM, to sign messages;
  • DMARC, to define how to handle unauthenticated messages;
  • MX, to specify the servers that receive mail for the domain.

SMTP transport authentication must be consistent with these records. The settings vary depending on the provider, so do not copy records from another domain. An incorrect value may disrupt the receipt of business email.

When checking messages sent via SMTP, verify the sender and the SPF and DKIM signatures in Mailtrap, where available. Compare Mailtrap’s results before carrying out the actual test on the domain.

Protect your contact form from spam as well by implementing a spam protection strategy. You can use a CAPTCHA, a hidden honeypot field and a limit on repeated submissions.

reCAPTCHA adds an automatic check to prevent bots. Compare the reCAPTCHA modes and use the keys that correspond to your configuration.

Set up reCAPTCHA correctly and check that the authorised domain matches the website. Apply stricter validation to the fields.

Limit the fields to the data you need. A long form reduces conversion rates, especially on smartphones.

From a security and privacy perspective, include a link to the Privacy Policy and a consent box where data processing requires it. Explain why you are collecting your name, email address and telephone number. Do not send sensitive data in the body of the email without taking appropriate precautions.

If you’d like to look at other cases of emails not being received, you can also have a look at this one discussion in the WordPress community. The solutions vary depending on the hosting provider, the service provider and the tools installed.

Plugin-free module: when it makes sense

You can create a custom form using HTML, CSS and PHP, but it’s not a quick fix for a business website. You’ll need to build the markup, handle the contact form’s POST request, validate the fields, sanitise the data and protect the form against fraudulent submissions.

The code must use a nonce to protect against CSRF attacks and include server-side validation. Email address validation can use a function such as sanitize_email(), whilst the name and message must be sanitised and are subject to length limits. Before sending or saving to the database, apply these checks and do not insert the data directly into an email command.

Once these checks have been carried out, the person handling the request can call wp_mail(). Unlike PHP’s native mail function, however, wp_mail() It does not, on its own, guarantee delivery. Falling back to PHP mail does not solve the problem: even a custom module must use an authenticated SMTP transport. Before carrying out the actual test, try out the custom handler in Mailtrap and check in Mailtrap that the formatted message is captured correctly.

For an SME, an up-to-date and well-configured WordPress plugin reduces time, errors and maintenance costs. A specialised contact form plugin, such as WPForms, minimises the amount of code that needs to be maintained.

The custom form can be inserted into the Gutenberg editor using a dedicated shortcode. Compared to inserting Contact Form 7 via a shortcode, it requires more effort. The shortcode does not replace the nonce or validate length limits. A custom form is justified when you need fields or workflows that standard solutions do not handle well.

Confirmations, redirects and contact tracking

Once submitted, every contact form should display a clear message. “Message sent” is fine, but you should also include the estimated response time and an alternative contact method. In WPForms, you can manage the confirmation message in the form settings.

For important commercial enquiries, use a redirect in WPForms to a thank-you page, rather than just an on-screen message. The thank-you page linked to WPForms can include a relevant call-to-action. Include the CTA in the submit button: “Book an initial consultation” or “Request a studio appointment” are clearer than “Contact us”. With Contact Form 7, separate the redirect from the shortcode and keep the shortcode in its intended place.

Before counting a conversion, check that the emails have been delivered via SMTP. The confirmation displayed in the browser does not prove that the internal email notifications have been received. Run an inbox test using Mailtrap and check the plugin’s notifications. Before enabling tracking, repeat the test using Mailtrap.

Track the submission as a conversion in GA4 or via Google Tag Manager. In WPForms, ensure that the event is only triggered after a successful submission: tracking does not depend on the shortcode. Segment the data by device: an average rate of 2% may mask a 4% rate from desktops and a 0.8% rate from smartphones. With Gutenberg, check the CTA block and the mobile layout: fewer fields and clear validation help the user journey on smartphones.

A fully functional module is part of the website’s business strategy. For a WordPress website development for SMEs, notifications, CTAs and measurement must be designed together.

Conclusion

When a WordPress email form isn’t sending messages, don’t immediately start by replacing the plugin. Use the contact form to check the recipient, sender, ‘Reply-To’ field, spam settings and submission log. Then set up an authenticated SMTP connection, check the DNS records and carry out a live test from a mobile device, making sure to press the submit button.

The form must deliver the message, protect the data and turn a visit into a concrete enquiry. If a single missed submission can mean one less customer, the website’s email system cannot be left to chance.

Frequently Asked Questions

Why does the WordPress form display a confirmation but I don’t receive an email?

The form can receive data without delivering the message: check the recipient, the spam folder, the sender’s domain and the logs. A contact form can confirm submission before it is finalised, so with WPForms you should also check the submission history.

Is certified transport compulsory for every form?

It is not strictly mandatory, but SMTP is recommended to authenticate outgoing mail and reduce bounce rates. The function wp_mail() It depends on the hosting provider and may fail or end up in the spam folder.

Which should I choose: WPForms or Contact Form 7?

The two plugins take different approaches: the first offers a setup wizard, whilst the second gives you more freedom. With Contact Form 7, however, you need to insert the shortcode and configure the messages manually.

Can I create a form without a plugin?

Yes, using HTML and PHP, but you’ll need to handle validation, sanitisation, nonces and anti-spam protection. For a code-free form, WPForms generates the shortcode and makes maintenance easier than with a manual solution.

How do I insert the form into a page?

To insert it into a page, paste the relevant shortcode into the designated block. With Gutenberg, you can then view the preview and check that the module looks as it should.

How do I protect the form from automated messages?

Use mandatory fields, data sanitisation and limits on repeated requests. You can add reCAPTCHA, whilst maintaining server-side checks and clear messages for the user.

When should you use Mailtrap to test email delivery?

This is a test sandbox: Mailtrap receives messages without sending them to the actual recipients. If Mailtrap receives the message but the actual inbox remains empty, the problem lies with subsequent delivery. Once you have fixed the issue, repeat the test in Mailtrap before using a real inbox.

Categories

Latest articles

A laptop with a checkout system, a promotional card, a calculator and neatly arranged boxes.
WooCommerce coupons: discounts and limits without errors
PrestaShop multi-store
PrestaShop Multistore: multiple shops, a single control panel
psychologists’ website
Website for psychologists: pages for receiving enquiries
WooCommerce VAT
VAT in WooCommerce: rates and prices for Italy
Powered by Joinchat