Contact Form to Google Spreadsheet and Email


I created a contact form that Send values to the Google spreadsheet. I used the

However the client wanted to get the same information in email as well.

I combined two scripts together and on the console log I get success messages from both POST action but for some reason email is not coming to the email.

Here is my HTML/php:


Here is my Javascript:

$("#foo-page").submit(function(event){   const $form_message = $('#form_message');   const $form_elements = $('#form_elements');   $form_elements.fadeOut(500);   $form_message.html('
We got your information. Thank you
').delay(500).fadeIn(700);   setTimeout( () => {   const $page_form = $('form#foo-page');   $page_form[0].reset();   $form_message.fadeOut(500);   $form_elements.delay(700).fadeIn(500);   }