¿ayuda con formulario PHP URGENTE:DOY 10 PUNTOS!!!!?

tengo 2 archivos:

1ero: url_send.php

<?php

$SENDTO =$_POST['SENDTO']; ///your e-mail adresse ( change in configuration xml file)

$message.=$_POST['HEADLINE']."\r\n\r\n\r\n"; /////entrance e-mail ( change in configuration xml file)

$KEY_SUBJECT=$_POST['KEY_SUBJECT']; ///// ( change in configuration xml file)

$KEY_RETURNABLE_EMAIL=$_POST['KEY_RETURNABLE_EMAIL']; ///// ( change in configuration xml file)

/////////////////////////////////////////////////////////////code send e-mail

foreach ($_POST as $varname => $varvalue) {

$array_value=explode(":",$varvalue);

$array[$varname][0]=$array_value[0];

$array[$varname][1]=$array_value[1];

}

$array=array_reverse($array);

foreach ($array as $varname => $varvalue) {

if($varname!="onLoad"&&$varname!="SENDTO"&&$varname!="HEADLINE"&&$varname!="KEY_SUBJECT"&&$varname!="KEY_RETURNABLE_EMAIL"){

$message.=$varvalue[0]." : \r\n ".$varvalue[1]."\r\n\r\n\n\n";

}

}

$subject =$array[$KEY_SUBJECT][1]; /////subject

$email_from=$array[$KEY_RETURNABLE_EMAIL][1];

/////header - version 1

$header = "From:$email_from <$email_from>\n";

$header .= "MIME-Version: 1.0\r\n"."Content-type: text/plain; charset=utf-8\r\n";

$header .= "Content-Type: text/plain;\n";

$header .= "\tcharset=\"iso-8859-2\"\n";

$header .= "Content-Transfer-Encoding: quoted-printable\n\n";

//////header - version2

///$header = "FROM:info@your_domain.com";

mail($SENDTO,$subject,$message,$header);

echo "&senden=ok&";

/////////////////////////////////////////////////////////end code

?>

2do: test_server.php

<?php

$email_send = "[email protected]"; ////your e-mail

$subject = "Hi!"; ////subject

$body = "Hi, How are you?"; ////body

$header = "FROM:[email protected]"; ////header

mail($email_send, $subject, $body,$header); ///// test function e-mail

echo("Check your e-mail ".$email_send);

?>

CUALES SON LAS PARTES QUE DEBO CAMBIAR, PORQUE HASTA AHORA NO TENGO SUERTE COLOCANDO EL CORREO DONDE QUIERE LLEGAR.

DOY 10 PUNTOS!!!!

Comments

  • A ver, mira en tu url_send.php no se ve todo el código! hay lineas como

    $_POST['KEY_RETU…

    si no vemos las lineas completas, no podemos ver si hay alguna falla (Ahora bien que si en verdad ESO ES TODO lo que tiene la linea, pues debes saber que todas es cortadas! nunca podrá funcionar así)

    trata de pegar el url_send.php en pastebin.com y danos la url, para poder revisar el código.

    Ahora bien, tu test_server.php funciona BIEN.

    para probarlo, cambie las lineas (si dejas eso de [email protected], el correo va a llegar ahí... si pusiste otra dirección ahí para probarlo, verdad?)

    mira:

    test_server.php

    <?php

    $email_send = "[email protected]"; ////your e-mail

    $subject = "Esto es un subject"; ////subject

    $body = "Este es el contenido"; ////body

    $header = "FROM:[email protected]"; ////header

    mail($email_send, $subject, $body,$header); ///// test function e-mail

    echo("Check your e-mail ".$email_send);

    si ejecutas ese script y entras en zzze.mailinator.com, podrás ver el mail.

    Ahora bien, si NO te funciona, es probable que no tengas sendmail instalado. Si estas haciendo tus pruebas con php desde tu pc con windows, usando una instalación local de apache y php, es muy probable que ese sea el caso. Pues debes saber que no basta con tener php instalado para poder mandar mails: TAMBIÉN NECESITAS SENDMAIL (u otro semejante) instalado.

Sign In or Register to comment.