I've now transferred a site where I'm working for a remote server, and I noticed now that mail does not reach my gmail inbox. I used a very simple method of code but it does not work, although it appears written "" Your email was sent successfully! ":
<?php
header('Content-type: text/html; charset=UTF-8');
$name = $_POST['name'];
$email = $_POST['email'];
$carga_type = $_POST['carga_type'];
$weight = $_POST['weight'];
$local = $_POST['local'];
$destiny = $_POST['destiny'];
$date = $_POST['date'];
$company = $_POST['company'];
$tele = $_POST['tele'];
$vol_number = $_POST['vol_number'];
$volume = $_POST['volume'];
$size = $_POST['size'];
$notes = $_POST['notes'];
$to = "[email protected]";
$subject = "Nova messagem";
$message = "De: ".$name."<br>
Email: ".$email."<br>
Tipo de carga: ".$carga_type."<br>
Peso: ".$weight."<br>
Local: ".$local."<br>
Destino: ".$destiny."<br>
Data: ".$date."<br>
empresa: ".$company."<br>
Telefone: ".$tele."<br>
Número de volumes: ".$vol_number."<br>
Volume: ".$volume."<br>
Medidas C x L x A: ".$size."<br>
Notas: ".$notes."<br><br>";
echo ($message);
if (($name == "") || ($carga_type == "") || ($date == "") || ($local == "") || ($tele == "") || ($vol_number==""))
{
echo 'Preencha todos os os campos mínimos necessários (Nome, Tipo de carga, Data, Local e Numero de telefone.)';
}
else
{
mail($to, $subject, $message);
echo "O seu email foi enviado com sucesso! ";
}
?>