problem with ajax contact forms

You want to be using the AJAX API instead of trying to load files directly. Even if you got that file to load, if it uses any WordPress functions it wouldn’t work anyway. If you load a theme file directly none of the WordPress Core will boot and so none of the function will be … Read more

Contact forms not sending mails

For SMTP and Gmail, you will need turn on 2 step verification, then create an App specific password in security panel of google account. Use your email and that password as login credential. You’ll also need use TSL or SSL for SMTP. Hope this help!

How to send email with wp_mail() with from email taken from contact form instead of the host?

You don’t need to pass the from name and email to PHPMailer in your code as it will take it from $headers so try the following: add_action( “phpmailer_init”, “send_smtp_email” ); function send_smtp_email( $phpmailer ) { // ini_set(“sendmail_from”,”[email protected]”); // ini_set(“sendmail_path”,”[email protected]”); // Define that we are sending with SMTP $phpmailer->isSMTP(); // The hostname of the mail server … Read more