Contact form not sending
Why a contact form does not send or messages do not arrive and how to fix SMTP, SPF and check spam.
A form may "send" a message that never arrives. The cause is often the way of sending or the recipient's mailbox.
Symptoms#
The form reports an error, shows a confirmation without the message arriving, or messages end up in spam.
Causes#
- sending via PHP
mail()from an address not on your domain (e.g.gmail.comas the sender), which recipients reject or mark as spam, - the recipient is misspelled or the mailbox is full (Disk space exceeded),
- missing SPF/DKIM records (SPF, DKIM and DMARC),
- a message limit or a sending block due to suspicious content,
- the form plugin is not configured or spam protection (reCAPTCHA) is set up incorrectly.
Fix#
- Check the recipient's spam folder and filters.
- Set the form's sender to an address on your domain (e.g.
form@yourdomain.com) and leave the recipient as the real address. Put the visitor's address in the Reply-To field. - Use SMTP instead of
mail(): in an SMTP plugin (e.g. for WordPress) enter the details from Access details: servermail.yourdomain.com, port 465, SSL/TLS, the full email address and its password. - Check SPF and DKIM in cPanel (Email Deliverability).
- Look at the logs for errors (PHP errors and logs).
- Test by sending to another address (e.g. at another provider).
Ticket#
Open a ticket with the domain, the sender and recipient addresses from the form, the approximate test time and the error message if one is shown.
Was this article helpful?
Thanks for your feedback! Need help? Open a ticket.
Related articles
Create an email addressHow to create an address like name@yourdomain.com in cPanel and set its password.SPF, DKIM and DMARCWhat these records are, how to check they are enabled and how to keep your mail out of spam.Email not arriving or not sendingA checklist for the most common causes: quota, MX records, password, program settings and spam.PHP errors and logsWhere to find error_log, how to enable error logging and how to read errors when troubleshooting.
