Dear, recently I bought a domain and hosting
in GoDaddy
, all right until you create my form with my. php
file so that the emails arrive to my email, so I find that nothing comes to me, here my code
PHP
<?php
$nombre = $_POST['nombre'];
$mail = $_POST['email'];
$empresa = $_POST['mensaje'];
$header = 'From: ' . $mail . " \r\n";
$header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
$header .= "Mime-Version: 1.0 \r\n";
$header .= "Content-Type: text/plain";
$mensaje = "Este mensaje fue enviado por " . $nombre . ",\r\n";
$mensaje .= "Su e-mail es: " . $mail . " \r\n";
$mensaje .= "Mensaje: " . $_POST['mensaje'] . " \r\n";
$mensaje .= "Enviado el " . date('d/m/Y', time());
$para = '***@****.com';
$asunto = 'Mensaje de mi sitio web';
mail($para, $asunto, utf8_decode($mensaje), $header);
header("Location:index.html");
?>
Here my form
<form action="" method="post" role="form" class="contactForm" action="process.php">
<div class="col-md-6 padding-right-zero">
<div class="form-group">
<input type="text" name="name" class="form-control" id="name" placeholder="Su Nombre" data-rule="minlen:4" data-msg="Please enter at least 4 chars" />
<div class="validation"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="email" class="form-control" name="email" id="email" placeholder="Su Correo" data-rule="email" data-msg="Please enter a valid email" />
<div class="validation"></div>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="text" class="form-control" name="subject" id="subject" placeholder="Asunto" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" />
<div class="validation"></div>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" rows="5" data-rule="required" data-msg="Please write something for us" placeholder="Mensaje"></textarea>
<div class="validation"></div>
</div>
<button type="submit" class="btn btn-primary btn-submit">ENVIAR</button>
</div>
</form>
And well I do not realize if my code is wrong the truth seems to me that it is correct apart from that I used it once on another page but on another server and if it worked, someone knows if GoDaddy
has some configuration more than Do not know, I'm pretty new in all this. I appreciate all help thanks