Php form submission error

I created new enquiry form for my website. But its giving the following error message.

Error
Sorry there was an error sending your form.
mail:Could not instantiate mail function.

—-Form Html—-

PHP Contact Form Script With Validation – reusable form

Contact Us

Send us your message and we will get back to you as soon as possible

First Name:

Last Name:

Email:

Phone:

Message:

Post It!

Sent your message successfully!
Error Sorry there was an error sending your form.

—-Handler.php—-

*/
require_once ‘./vendor/autoload.php’;

use FormGuideHandlxFormHandler;

$pp = new FormHandler();

$validator = $pp->getValidator();
$validator->fields([‘firstname’,’lastname’, ’email’,’phone’])->areRequired()->maxLength(50);
$validator->field(’email’)->isEmail();
$validator->field(‘message’)->maxLength(6000);

$pp->sendEmailTo(‘name@mail.com’); // ← Your email here

echo $pp->process($_POST);

Read more here:: Php form submission error

Leave a Reply

Your email address will not be published. Required fields are marked *