Ver Mensaje Individual
  #10 (permalink)  
Antiguo 18/10/2007, 13:32
talcual
(Desactivado)
 
Fecha de Ingreso: diciembre-2006
Mensajes: 225
Antigüedad: 17 años, 5 meses
Puntos: 1
Re: Error enviando Mail

mira bro yo tengo este cod q arme modificalo a tu modo y yap pero no le quites los creditos hay te lo dejo :


Código PHP:
<?php

///////////////
////////////
///////
/// Mod Mandar chiste by CL Labs 
///  http://lab.codigolandia.com
///////
////////////
///////////////

$name $_POST['nombre'];
$cate $_POST['categoria'];
$chis $_POST['chiste'];



$destinatario "[email protected]"
$asunto "Chiste enviado por ".$name
$cuerpo 
<html> 
<head> 
   <title>Chiste de Usuario</title> 
</head> 
<body> 
<h1>Un Usuario Manda el Siguiente chiste :</h1> 
<p> 
<b>'
.$chis.'
</p> 
</body> 
</html> 
'


//para el envío en formato HTML 
$headers "MIME-Version: 1.0\r\n"
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"

//dirección del remitente 
$headers .= "From: Chistes-usuarios <[email protected]>\r\n"

//dirección de respuesta, si queremos que sea distinta que la del remitente 
$headers .= "Reply-To: [email protected]\r\n"

//ruta del mensaje desde origen a destino 
$headers .= "Return-path: [email protected]\r\n"


if(
$_POST['boton']){
  
mail($destinatario,$asunto,$cuerpo,$headers); 
}
?> 


<style type="text/css">
<!--
.log {
  width: 340;
  height:150;
  border: solid;
  border-width: thin;
}
-->
</style>


   
   
   <div align="center" id="login" class="log">
   <form method="post">
   <table>
   <tr>
   <td>usuario:</td>
   <td><input type="text" name="nombre"></td></tr>
   <tr><td>categoria:</td>
   <td><input type="text" name="categoria"></td></tr>
   <tr><td>chiste:</td>
   <td>  <textarea name="chiste" cols="42" id="chiste" ></textarea></td></tr>
   <tr><td colspan="2" align="center">
   <input type="submit" name="boton" value="Enviar chiste" /></td></tr>
   </table>
   </form> 
   </div>
Nota : Funciona a la Perfeccion solo si tienes bien configurado el send_mail oist

Última edición por talcual; 18/10/2007 a las 13:33 Razón: se me olvido algo