contact form not working

Hi, I have made a website with a HTML template E-charity. It is finished but only the contactform with PHP is not working. Can somebody help me with that?


Can you please explain on what issue are you exactly facing ?

Hi, thank you for your reaction! I fill in the form and than I click on submit, and nothing happens…

this is my website and the contactform:


Do you want to send an email if its filled ?

if so then you need to share the php code to find out the issue.

also i can see the php file to send email is not found on the server

check if you have uploaded the file properly.

I want the contacts of the form emailed to Yes you are right, I just adjusted the path. (I was experimenting) Now the php file should be found again. This is the content of the sendmail.php file:



$mail = new PHPMailer();

//$mail->SMTPDebug = 3;                               // Enable verbose debug output
$mail->isSMTP();                                      // Set mailer to use SMTP
$mail->Host = '';  // Specify main and backup SMTP servers
$mail->SMTPAuth = true;                               // Enable SMTP authentication
$mail->Username = '';                 // SMTP username
$mail->Password = 'AsDf12**';                           // SMTP password
$mail->SMTPSecure = 'ssl';                            // Enable TLS encryption, `ssl` also accepted
$mail->Port = 465;                                    // TCP port to connect to

$message = "";
$status = "false";

    if( $_POST['form_name'] != '' AND $_POST['form_email'] != '' AND $_POST['form_subject'] != '' ) {

        $name = $_POST['form_name'];
        $email = $_POST['form_email'];
        $subject = $_POST['form_subject'];
        $phone = $_POST['form_phone'];
        $message = $_POST['form_message'];

        $subject = isset($subject) ? $subject : 'New Message | Contact Form';

        $botcheck = $_POST['form_botcheck'];

        $toemail = ''; // Your Email Address
        $toname = 'ThemeMascot'; // Your Name

        if( $botcheck == '' ) {

            $mail->SetFrom( $email , $name );
            $mail->AddReplyTo( $email , $name );
            $mail->AddAddress( $toemail , $toname );
            $mail->Subject = $subject;

            $name = isset($name) ? "Name: $name<br><br>" : '';
            $email = isset($email) ? "Email: $email<br><br>" : '';
            $phone = isset($phone) ? "Phone: $phone<br><br>" : '';
            $message = isset($message) ? "Message: $message<br><br>" : '';

            $referrer = $_SERVER['HTTP_REFERER'] ? '<br><br><br>This Form was submitted from: ' . $_SERVER['HTTP_REFERER'] : '';

            $body = "$name $email $phone $message $referrer";

            $mail->MsgHTML( $body );
            $sendEmail = $mail->Send();

            if( $sendEmail == true ):
                $message = 'We have <strong>successfully</strong> received your Message and will get Back to you as soon as possible.';
                $status = "true";
                $message = 'Email <strong>could not</strong> be sent due to some Unexpected Error. Please Try Again later.<br /><br /><strong>Reason:</strong><br />' . $mail->ErrorInfo . '';
                $status = "false";
        } else {
            $message = 'Bot <strong>Detected</strong>.! Clean yourself Botster.!';
            $status = "false";
    } else {
        $message = 'Please <strong>Fill up</strong> all the Fields and Try Again.';
        $status = "false";
} else {
    $message = 'An <strong>unexpected error</strong> occured. Please Try Again later.';
    $status = "false";

$status_array = array( 'message' => $message, 'status' => $status);
echo json_encode($status_array);

did you figure it out yet?

Have you read the documentation with the file which almost certainly will cover this?

Is the pho file back to how it was originally before you were experimenting? (Minus adding your own email address).

Item specific questions should go via the author of the file (no dis-respect to @varunsridharan knowledge of skills!).

You need to sign in with the account that purchased the item and you can find the support info on the tab above the main image on the item page

Hi yes, I read the documentation and did everything according that. I used the php file which was in the download files of the theme Echarity. The author is not responding to my last question.

I will try again with the author

It may be that they don’t reply on weekends

Theres nothing stopping people from here helping you - just that the author will know best.