Ver Mensaje Individual
  #6 (permalink)  
Antiguo 21/03/2011, 13:02
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Enviar un mail de contenido dinámico -php + MySQL- mediante la función mai

Sigue la estructura que te deje no deberías de tener ningún problema:
Código PHP:
Ver original
  1. <?php
  2.  
  3. $email = "[email protected]";
  4. $asunto = "Respuesta - Solicitud de Presupuestos";
  5. $contenedor_mensaje1 = '<html>
  6. <head>
  7. <title>Titulo de la Pagina</title>
  8. </head>
  9. <body>';
  10.  
  11. while ($data = fetch()) {
  12.           $contenedor_mensaje1 .= "con etiquetas html <strong>" . $data . "</strong><br />";
  13. }
  14.  
  15. $contenedor_mensaje1 .= '</body>
  16. </html>';
  17.  
  18. //este código envía el correo
  19. $headers = "MIME-Version: 1.0\r\n";
  20. $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
  21. $headers .= "From: [email protected]\r\n";
  22.  
  23.  
  24.     mail($email, $asunto, $contenedor_mensaje1, $headers);  
  25.  
  26.  
  27. ?>

Saludos.