Ver Mensaje Individual
  #6 (permalink)  
Antiguo 28/01/2011, 08:43
eldan2002
 
Fecha de Ingreso: enero-2011
Mensajes: 46
Antigüedad: 13 años, 3 meses
Puntos: 2
Respuesta: Enviar e-mail y wordpress

Código PHP:
Ver original
  1. function envioEmail($form){
  2. // antes debes iniciar tus variables y hacer tu conexion a la bd (si usas una)
  3.  
  4. /* DECLARAMOS NUESTRO OBJETO TIPO AJAX */
  5.     $miObjeto = new xajaxResponse();
  6.     $miObjeto->setCharEncoding('utf-8');
  7.  
  8.  
  9. $usuario = $form["email"]; // del form tomo el mail destinario
  10.  
  11. $headers = "MIME-Version: 1.0\r\n";
  12.         $headers.= "From: NOMBRE <[email protected]\n";
  13.         $headers.= "Content-type:  text/html; charset=utf-8\r\n";
  14.  
  15.  
  16. $cuerpo = "Aqui va mi mensaje en html <br /> ";
  17.  
  18. //FUNCION DE PHP. (mail, asunto, cuerpo,..... "agregados")
  19. mail($email,"el asunto de este mail " ,$cuerpo,$headers);
  20.  
  21. return $miObjeto;  
  22. }