Sending problem in the contact form BigStream Wordpress theme, setting up the mail-it.php file

0

I am not able to make contact form of the Bigstream theme of wordpress work, when I click on send it shows message of success but the email does not arrive.

I found the following file 'mail-it.php' but I do not know exactly how to configure it, I tried to put my email in it but it did not work.

Anyone have an idea how to set up the email below?

<?php

/* Code by David McKeown - craftedbydavid.com */
/* Editable entries are bellow */

$send_to = "[email protected]";
$send_subject = "Ajax form";



/*Be careful when editing below this line */

$f_name = cleanupentries($_POST["name"]);
$f_email = cleanupentries($_POST["email"]);
$f_message = cleanupentries($_POST["message"]);
$from_ip = $_SERVER['REMOTE_ADDR'];
$from_browser = $_SERVER['HTTP_USER_AGENT'];


function cleanupentries($entry) {
    $entry = trim($entry);
    $entry = stripslashes($entry);
    $entry = htmlspecialchars($entry);

    return $entry;
}

$message = "This email was submitted on " . date('m-d-Y') .
"\n\nName: " . esc_attr( $f_name ) .
"\n\nE-Mail: " . esc_attr( $f_email ).
"\n\nMessage: \n" . ff_wp_kses( $f_message ) .
"\n\n\nTechnical Details:\n" . esc_attr( $from_ip ) . "\n" . esc_attr( $from_browser );

$send_subject .= " - {$f_name}";

$headers = "From: " . esc_attr( $f_email ) . "\r\n" .
    "Reply-To: " . esc_attr( $f_email ) . "\r\n" .
    "X-Mailer: PHP/" . phpversion();

if (!$f_email) {
    echo "no email";
    exit;
}else if (!$f_name){
    echo "no name";
    exit;
}else{
    if (filter_var($f_email, FILTER_VALIDATE_EMAIL)) {
        mail($send_to, $send_subject, $message, $headers);
        echo "true";
    }else{
        echo "invalid email";
        exit;
    }
}

?>
    
asked by anonymous 19.04.2016 / 14:33

0 answers