Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/05/2010, 13:58
F_100_Joe2
 
Fecha de Ingreso: mayo-2010
Mensajes: 39
Antigüedad: 13 años, 11 meses
Puntos: 0
ayuda con esto, no me sale.

hola tengo un formulario... que apunta... ha:

config.php


Código PHP:
<?php

//Recepcion de E-Mail
$to 'MAIL';


//Info del Usuario
$name stripslashes($_POST['name']); //sender's name
$email stripslashes($_POST['email']); //sender's email
$subject stripslashes($_POST['subject']); //sender's website

//Tema
$subject  "[Mensaje] "//Tema
//Tema
$subject .= stripslashes($_POST['subject']); // the subject


//MSG Cadenas
$msg  "From : $name \r\n";  //Agrega el Nombre
$msg .= "e-Mail : $email \r\n";  //Agrega el Email
$msg .= "Website : $website \r\n"//Agrega el Sitio web
$msg .= "Subject : $subject \r\n\n"//Agrega el Subject... memoria: seba se agrega al header
$msg .= "---Mensaje--- \r\n".stripslashes($_POST['message'])."\r\n\n";  //El MENSAJE

//Mas Info del User: IP, y demas
$msg .= "---Informacion Del Usuario--- \r\n"//Titulo
$msg .= "Usuario IP : ".$_SERVER["REMOTE_ADDR"]."\r\n"//Envia la IP
$msg .= "Navegador : ".$_SERVER["HTTP_USER_AGENT"]."\r\n"//Navegador
$msg .= "Pais : ".$_SERVER["HTTP_REFERER"]; //Pais
// END Extras

?>
contact.php

Código PHP:
<?php
/*
Creado Por Seba
URL: Saco la web para evitar salir en google :O
*/

include 'config.php';

error_reporting (E_ALL E_NOTICE);

$post = (!empty($_POST)) ? true false;

if(
$post)
{
include 
'functions.php';

$name stripslashes($_POST['name']);
$email trim($_POST['email']);
$subject stripslashes($_POST['subject']);
$message stripslashes($_POST['message']);


$error '';

// Check name

if(!$name)
{
$error .= 'Por Favor, Ingrese su Nombre.<br />';
}

// Check email

if(!$email)
{
$error .= 'Por Favor, Ingrese una direccion de e-Mail.<br />';
}

if(
$email && !ValidateEmail($email))
{
$error .= 'Por Favor, Verifique que su direccion de e-Mail.<br />';
}

// Check message (length)

if(!$message || strlen($message) < 15)
{
$error .= "Por Favor, Deletree al menos 15 caracteres.<br />";
}


if(!
$error)
{
$mail mail(WEBMASTER_EMAIL$subject$message,
     
"From: ".$name." <".$email.">\r\n"
    
."Reply-To: ".$email."\r\n"
    
."X-Mailer: PHP/" phpversion());


if(
$mail)
{
echo 
'OK';
}

}
else
{
echo 
'<div class="notification_error">'.$error.'</div>';
}

}
?>
fuctions.php

Código PHP:
<?php
function ValidateEmail($email)
{
/*

*/

$regex '/([a-z0-9_.-]+)'# name

'@'# at

'([a-z0-9.-]+){2,255}'# domain & possibly subdomains

'.'# period

'([a-z]+){2,10}/i'# domain extension 

if($email == '') { 
    return 
false;
}
else {
$eregi preg_replace($regex''$email);
}

return empty(
$eregi) ? true false;
}
?>
feedback.php

Código PHP:
<?php
/*

*/

include 'config.php';

error_reporting (E_ALL E_NOTICE);

$post = (!empty($_POST)) ? true false;

if(
$post)
{
include 
'functions.php';

$name stripslashes($_POST['name']);
$message stripslashes($_POST['message']);

$error '';

// Check name

if(!$name)
{
$error .= 'Ingrese su Nombre.<br />';
}

// Check message (length)

if(!$message || strlen($message) < 15)
{
$error .= "Por Favor escriba su mensaje. Debe tener al menos 15 Caracteres.<br />";
}


if(!
$error)
{
$mail mail(WEBMASTER_EMAIL'Feedback'$message,
     
"From: ".$email."\r\n"
    
."Reply-To: ".$email."\r\n"
    
."X-Mailer: PHP/" phpversion());

if(
$mail)
{
echo 
'OK';
}

}
else
{
echo 
'<div class="notification_error">'.$error.'</div>';
}

}
?>
Mi pregunta.. es que estoy haciendo mal en config.php que no me deja enviar el mail... tenia otro form.. que enviaba mail con la ip y todo... pero si le saco todo el codigo extra que te recupera las variables del mensaje... nombre apellido en el cuerpo del mensaje... me lo manda ... pero yo quiero que las recupere... en el cuerpo tambien... sino solamente me recupera el mensaje solo y es re feo