One additional note:
If anyone else uses the theme Highend from HB-Themes.com and needs to fix this right away. It is very simple to do:
The problem is with the file functions.php
on line 1313. In that line the email function uses
mail($to, $subject, $message, $headers);
Simply change this to (adding the wp_
):
wp_mail($to, $subject, $message, $headers);
This will alow Postman to work as it hooks into the wp_mail()
function. Note: the php mail()
function is blocked in WPEngine and many other hosts.
And better yet, put an override in your child theme for this.
To find this function (in case the line number changes later), look for this function (my change to this function is already present below):
/* AJAX MAIL
================================================== */
add_action(‘wp_ajax_mail_action’, ‘sending_mail’);
add_action(‘wp_ajax_nopriv_mail_action’, ‘sending_mail’);
function sending_mail() {
$site = get_site_url();
$subject = __(‘New Message!’, ‘hbthemes’);
$email = $_POST[‘contact_email’];
$email_s = filter_var($email, FILTER_SANITIZE_EMAIL);
$comments = stripslashes($_POST[‘contact_comments’]);
$name = stripslashes($_POST[‘contact_name’]);
$to = hb_options(‘hb_contact_settings_email’);
$message = “Name: $name \n\nEmail: $email \n\nMessage: $comments \n\nThis email was sent from $site”;
$headers = ‘From: ‘ . $name . ‘ <‘ . $email_s . ‘>’ . “\r\n” . ‘Reply-To: ‘ . $email_s;
wp_mail($to, $subject, $message, $headers);
exit();
}
Note: In my case, because I expect them to fix this soon, I’m just modifying the original functions.php
, even though I know it will be overritten when the theme is updated, because I don’t want to put work-arounds in my child theme for silly things like this unless I must. ??