SBel
SBel

Reputation: 3361

Contact Form 7 not working

I have WordPress v3.9.2 installed on HostGator. I've installed the Contact Form 7 plugin. When I try to send an e-mail I get the following error:

enter image description here

In Chrome Dev Tools I see that it makes an AJAX call which returns the following info:

enter image description here

To troubleshoot this problem I opened the HostGator error log but it's empty. Does anybody have a suggestion of how I can troubleshoot this issue and get Contact Form 7 to work?

Upvotes: 4

Views: 16548

Answers (3)

Mayank Dudakiya
Mayank Dudakiya

Reputation: 3869

There could be the following issues that prevent contact form 7 from working.

  1. Contact Form 7 plugin conflict with other plugin or theme
  2. jQuery or JavaScript error that stops Contact Form 7's ajax mechanism
  3. Invalid HTML structure
  4. The mail recognized as spam
  5. he mail could not be delivered to the outgoing mail server
  6. wp_head() and get_footer() are missing in footer.php and header.php file
  7. Misconfiguration in Contact Form 7

Read More: https://www.scratchcode.io/contact-form-7-is-not-working-issues/

Upvotes: 0

SBel
SBel

Reputation: 3361

I got it to work by doing the following 2 things:

  1. Deactivating the WP-Mail-SMTP plugin which "Reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page to manage the settings."

  2. Making the From field in the Contact Form 7 plugin have my website domain. For example, [email protected]

Upvotes: 6

lxg
lxg

Reputation: 13107

According to the source code of wpcf7, there are two possible reasons for this message:

  1. The message was recognized as spam.
  2. The message could not be delivered to the outgoing mail server (the one active on your own server).

Unfortunately, there is no way to tell what actually happened but to modify the source code and try to generate some debug output.

A first thing to do might be to find out if its possiblity 1 or 2, then (if it's 2), remove the @ sign in front of the call to the wp_mail() call in WPCF7_ContactForm->compose_mail(), or set the WP_DEBUG to true in the wp-config.php file.

Upvotes: 0

Related Questions