<?php
/*
This is script for sending email to yours email adress.
Autor: miticdjd
Site:
www.miticdjd.com
Email:
[email protected]
*/
//Here write your email. Replace "your email" with your real email Exemple:
[email protected]
$to = "
[email protected]";
//Here insert where you want to be redirected when send email
$page = "gracias.php";
//This line give as IP adress of sender. This is good for spam messages.
$IP = $_SERVER['REMOTE_ADDR'];
//This reques name from form.
$name = $_REQUEST['name'];
//A subject.
$subject = $_REQUEST['subject'];
//A email.
$email = $_REQUEST['email'];
//A email for verify.
$email_verify = $_REQUEST['email_verify'];
//Publicidad
$telefono = $_REQUEST['telefono'];
$movil = $_REQUEST['movil'];
$giro = $_REQUEST['giro'];
$empresa = $_REQUEST['empresa'];
$evento = $_REQUEST['evento'];
//Publicidad
$nevento = $_REQUEST['nevento'];
$organiza = $_REQUEST['organiza'];
$lugar = $_REQUEST['lugar'];
$fecha = $_REQUEST['fecha'];
$horario = $_REQUEST['horario'];
$ubicacion = $_REQUEST['ubicacion'];
$otro = $_REQUEST['otro'];
//Request message from form.
$mensaje = $_REQUEST['mensaje'];
//This checking email is true.
$validate=ereg("^[^@ ]+@[^@ ]+\.[^@ ]",$email);
//Date of sending message.
$date = date("d/m/y H:i a");
//If email is true and there was no error, sending email.
If ($email == $email_verify and $validate) {
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$headers .= "To: Mi nombre <".$miemail.">\r\n";
$headers .= "From: ".$to." <".$to.">\r\n";
$headers .= "Reply-To: ".$miemail."\r\n";
mail("$to", "$subject",
"
Datos Personales
Nombre del contacto: $name
Email: $email
Teléfono: $telefono
Móvil: $movil
. . .
Publicidad
Empresa: $empresa
Evento: $evento
Giro de la empresa: $giro $otro
. . .
Evento
Nombre del evento: $nevento
Organiza: $organiza
Lugar: $lugar
Ubicación: $ubicacion
Fecha: $fecha
Horario: $horario
Mensaje: $mensaje \n
Direccion ip: $IP
", $headers);
header( "Location: $page" );
}
else {
//if there was an error displaying this message. If you want replace "There was an error sending a message!" with your message.
echo "
<center><a href='javascript
:history.back(1)'><img src=images/x.png border=0'/></a></center>
";
}
?>