This is the code. Man I'm sending this to my online server e-mail and the php form server is not working! The email never arrive! Anyone knows why it not working correctly?

`

Enter some text in the fields below, then press the "Submit form" button to submit the form.

 name:   

 tel:   

 mail:   

function myFunction() {

 document.getElementById("myForm").submit();

}

```
<?php

if (isset($_POST['submit'])){

$name     = $_POST['name'];
$tel      = $_POST['tel'];
$mailFrom = $_POST['mail'];

$subject  = "Solicitação de cotação recebida por ".$name;
$message  = "hello ".$tel;

$headers  = "Email: " .$mailFrom;
$txt      = "Você recebeu uma solicitação de cotação recebida por ".$name.".\n\n".$message;

$mailTo1   = 'marketing@macbrs.com.br';

mail($mailTo1,  $subject, $txt, $headers);

header("Location: action_page.php?mailsend");

}
?>

```

`

I want a code that makes connection with php and javascript
to natural server and gmail!
looks like this -

name
title

button onclick calltoaction

function calltoaction

activate php

php post data

name
title

send to mail!

if anyone can help!

Simple solutions man! Plz!