Unable to load the "PHP Email Form" Library

Solution:

Or you can write own sender. Something like this.

contact.php

$to = 'yourmail@yourdomain.ltd';
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_SPECIAL_CHARS);
$from = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL);
$subject = filter_input(INPUT_POST, 'subject', FILTER_SANITIZE_SPECIAL_CHARS);
$message = filter_input(INPUT_POST, 'message', FILTER_SANITIZE_SPECIAL_CHARS);

if (filter_var($from, FILTER_VALIDATE_EMAIL)) {
    $headers = ['From' => ($name?"<$name> ":'').$from,
            'X-Mailer' => 'PHP/' . phpversion()
           ];

    mail($to, $subject, $message."\r\n\r\nfrom: ".$_SERVER['REMOTE_ADDR'], $headers);
    die('OK');
    
} else {
    die('Invalid address');
}

Answer

Solution:

the code is searching for a file "php-email-form.php" in this particular directory/folder,-> ../assets/vendor/php-email-form/php-email-form.php, check if the required php is present there, otherwise you need to create one and place it there.

Answer

Solution:

You can't assign a variable in file_exists(). Use

if( file_exists('../assets/vendor/php-email-form/php-email-form.php')) {
    include('../assets/vendor/php-email-form/php-email-form.php');
} else {
    die( 'Coming Soon!');
}

or

$php_email_form = '../assets/vendor/php-email-form/php-email-form.php';
if(file_exists($php_email_form)) {
    include($php_email_form);
} else {
    die('Coming Soon!');
}

Answer

Solution:

you are using the free template and the PHP Form requires the "PHP Email Form" library and the "PHP Email Form" library is available only in the pro version of the template.

you must to buy the pro version template

if you don't want to buy you must create your own php code

Source