1

I'm new with PHP. I have a web with two form contacts, one in the index and another in the contact page. When it went up page 7 months ago, contact forms were working perfect, but now do not work and I have no idea what is happening.

Now when I go to send a message show me the following error:

Error: "Your message could not be sent, try again later"

So I check the files but apparently all is well, please appreciate if someone can guide me a bit on this issue.

Code is:

**html**

<!-- Book Apointment -->
    <div class="book-form">
        <div class="inner-form">

        <h4><img src="images/calendar.png" alt="">Agende una Cita</h4>
        <form id="contact" action="process1.php" method="post">
            <div class="inputs">
                <input name="name" type="text" value="Full Name" data-value="Nombre Completo">
                <input name="email" type="text" value="E-mail Adress" data-value="E-mail">
                <input name="phone" type="text" value="Phone Number" data-value="Numero de Telefono">
                <input name="fecha" id="datepicker-example1" type="text" value="Escoja su cita">
            </div>

            <input id="submit" type="submit" value="Solicite su Cita">
        </form>

        </div>
    </div>
    <!-- End Book Apointment -->

php



  <?php
    // Get Data 
    $name = strip_tags($_POST['name']);
    $email = strip_tags($_POST['email']);
    $phone = strip_tags($_POST['phone']);
    $fecha = strip_tags($_POST['fecha']);

    // Send Message
    mail( "consultorio@dredgarfelipediaz.com", "Solicitud de Cita",
    "Name: $name\nEmail: $email\nPhone: $phone\nFecha: $fecha\n",
    "From: Solicitud de Cita <Servidor Medialog Agencia Creativa>" );

    //Enviamos el mensaje y comprobamos el resultado
    if (@mail($name, $email, $phone, $fecha )) {

    //Si el mensaje se envía muestra una confirmación
    die("Gracias, su mensaje se envio correctamente.");
    }else{

    //Si el mensaje no se envía muestra el mensaje de error
    die("Error: Su información no pudo ser enviada, intente más tarde");
    }
    ?>
halfer
  • 19,824
  • 17
  • 99
  • 186

0 Answers0