Agradecería cualquier orientación… gracias!
html:
Código HTML :
<div id="content" class="col col-2"> <h2>CONTÁCTANOS</h2> <p>No dudes en contactarnos. En <a href="index.html">Viviart</a>, estaremos encantados de atenderte.</p> <form action="" method="post" class="validate-form"> <div class="msg msg-thanks" style="display:none"> <strong>Gracias!</strong> Tu mensaje ha sido enviado! </div> <div class="msg msg-alert" style="display:none"> <strong>Error!</strong> Por favor, rellene todos los datos! </div> <div class="row"> <label>Su Nombre <span>(Obligatorio)</span></label> <input type="text" id="name-field" name="name-field" class="field required text-field" /> </div> <div class="row"> <label>E-Mail <span>(Obligatorio)</span></label> <input type="text" id="mail-field" name="mail-field" class="field required valid-email text-field" /> </div> <div class="row"> <label>Empresa</label> <input type="text" id="company-field" name="company-field" class="field text-field" /> </div> <div class="row"> <label>Mensaje <span>(Obligatorio)</span></label> <textarea id="message-field" name="message-field" class="field required text-field" cols="100" rows="5"></textarea> </div> <div class="row button-row"><input type="submit" class="submit-button" value="Enviar Mensaje" /></div> </form> </div>
php:
Código PHP :
<?php /*** ---------- CHANGE THIS TO YOUR EMAIL ADDRESS ------------- ***/ $MAIL_TO = '[email protected]'; /*** ---------------------------------------------------------- ***/ $subject = "Tripthychos :: new message"; $time = date('Y-m-d H:i'); $name = $_POST['name-field']; $mail = $_POST['mail-field']; $company = $_POST['company-field']; $message = $_POST['message-field']; $body = "Time: $time\n"; $body .= "Name: $name\nEmail: $mail\nCompany: $company\n"; $body .= "Message:\n$message"; @mail($MAIL_TO, $subject, $body); echo 'sent!'; ?>