Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/01/2010, 13:43
laurapower
 
Fecha de Ingreso: enero-2010
Mensajes: 5
Antigüedad: 14 años, 9 meses
Puntos: 0
Respuesta: no puedo enviar una solucitud en mi pagina creada con php y flash

ok, te envio el codigo

<?php
$contact_name = $_POST['nombre'];
$contact_email = $_POST['email'];
$contact_subject = $_POST['concepto'];
$contact_message = $_POST['mensaje'];

if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "[email protected]";
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "Nombre: $contact_name \nEmail: $sender \n\nConcepto: $contact_concepto \n\nMensaje: \n\n$contact_mensaje \n\nIP: $client_ip \n\nFlash Contact Form";
$extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();

if( mail( $receiver, "Flash Contact Form - $contact_concepto", $email_body, $extra ) )
{
echo "success=yes";
}
else
{
echo "success=no";
}
}
?>



y luego esta el de auto respuesta:


<?php
$contact_name = $_POST['nombre'];
$contact_email = $_POST['email'];
$contact_subject = $_POST['concepto'];
$contact_message = $_POST['mensaje'];

if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "[email protected]";
$client_ip = $_SERVER['REMOTE_ADDR'];

$email_body = "Name: $contact_name \nEmail: $sender \n\nSubject: $contact_subject \n\nMessage: \n\n$contact_message \n\nIP: $client_ip \n\nFlash Contact Form";
$email_body_auto_reply = "Hello $contact_name, \nThis is the auto reply message. Thank you. \n\nAdmin - http://www.dinamicadigital.es";

$extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
$extra_auto_reply = "From: $receiver\r\n" . "Reply-To: $receiver \r\n" . "X-Mailer: PHP/" . phpversion();

mail( $sender, "Auto Reply - Re: $contact_subject", $email_body_auto_reply, $extra_auto_reply ); // auto reply mail to sender

if( mail( $receiver, "Flash Contact Form - $contact_subject", $email_body, $extra ) )
{
echo "success=yes";
}
else
{
echo "success=no";
}
}
?>