Support » Plugin: WP Mail SMTP by WPForms » Trouble on localhost, Wp Database error even though mail has been sent

  • Resolved Nate Zander

    (@mtnporcupine)


    Hello and thank you for this great plugin. I’ve struggled with sending email via wp_mail() for years.

    I’ve configured the plugin using the Gmail API and its working perfectly on my production site.

    However on local it seems to trigger an error even though the email is sent successfully. I call wp_mail inside a function triggered by ajax, which in turn triggers my error handler even though it sends a 200 response. Any ideas?

    <div id="error"><p class="wpdberror"><strong>WordPress database error:</strong> [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE option_name = 'wp_mail_smtp_debug' LIMIT 1' at line 1]<br /><code>SELECT option_value FROM WHERE option_name = 'wp_mail_smtp_debug' LIMIT 1</code></p></div><div id="error"><p class="wpdberror"><strong>WordPress database error:</strong> [Incorrect table name '']<br /><code>INSERT INTO(option_name,option_value,autoload) VALUES ('wp_mail_smtp_debug', 'a:0:{}', 'no') ON DUPLICATE KEY UPDATEoption_name= VALUES(option_name),option_value= VALUES(option_value),autoload= VALUES(autoload)</code></p></div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Sanjeev Aryal

    (@sanzeeb3)

    Hi @mtnporcupine,

    When you get a chance, please share the related codes you’re using? Do you get errors while using wp_mail() without ajax? Make sure MySQL version of your local is not outdated to generate that syntax error.

    Thanks!

    Plugin Support Sanjeev Aryal

    (@sanzeeb3)

    Hi @mtnporcupine – We haven’t heard from you in about a week, so I’m going to go ahead and mark this ticket resolved. If you still have questions, though, please feel welcome to continue the conversation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trouble on localhost, Wp Database error even though mail has been sent’ is closed to new replies.