What mail headers do the contact form send? I am finding all messages go straight to junk, even though the email address is on the same domain. I’ve checked my mail server IP and it isn’t on any blacklists. Is there anything else I can do to the form code itself to ensure less capture from spam filters? Or would you recommend I switch to Contact Form 7 or similar?
Enfold is an amazing theme but IMHO the form wasn’t really given the same attention to detail the rest of the theme has been given. I know many people will just use a 3rd party plugin, but I like to keep the installation as streamlined as possible to avoid slowing load times and server requests etc (obviously with all the features, it’s not the fastest WP theme there is!!).
But I’m not complaining, it’s almost the perfect multi-purpose theme!
I’m not aware of any special header code – we just use the standard php mail() function to send the mails. The code can be found in wp-contentthemesenfoldframeworkphpclass-form-generator.php:
$header = 'MIME-Version: 1.0' . "rn";
$header .= 'Content-type: text/html; charset=utf-8' . "rn";
$header .= 'From:'. $from . " rn";
wp_mail($to, $subject, $message, $header);
mail($to, $subject, $message, $header);