Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/07/2010, 15:51
Avatar de function
function
 
Fecha de Ingreso: abril-2010
Mensajes: 278
Antigüedad: 14 años, 9 meses
Puntos: 13
Problemas para que me llegue emal con estilos

Amigos,

Tengo este inconveniente, no he podido enviar un email para que me llegue con estilos css, me llega solamente a thunderbird (perfectamente), pero con outlook, me dice que si tiene probelmas para verlo mejor mirarlo via el navegador, y a Gmail directamente no se ve nada sino purso texto.
Tengo lo siguiente:

Código PHP:
Ver original
  1. $destinatario = "[email protected]";
  2. $asunto = "Green Newsletter";
  3. $cuerpo = '
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>Green Newsletter</title>
  8. <style type="text/css">
  9. <!--
  10. body {
  11.    background:#ffffff url(http://www.domino.com/newsletter/images/bg.jpg) center top repeat-x;
  12.    margin:0;
  13. }
  14. .general {
  15. font-family:Tahoma;
  16. font-size:12px;
  17. font-style:normal;
  18. font-weight:normal;
  19. text-decoration:none;
  20. color:#666666;
  21. }
  22. .general h1 {
  23. font-family:Tahoma;
  24. font-size:13px;
  25. font-style:normal;
  26. font-weight:bold;
  27. text-decoration:none;
  28. color:#fff;
  29. }
  30. #container {
  31. text-align: left;
  32. width: 700px;
  33. margin: auto;
  34. }
  35. #content {
  36. background:url(http://www.dominio.com/newsletter/images/header.jpg) center top no-repeat;
  37. float:left;
  38. text-align: left;
  39. width: 700px;
  40. margin:0;
  41. }
  42. #title {
  43. float:left;
  44. text-align:center;
  45. width:700px;
  46. height:30px;
  47. margin:0;
  48. padding:20px 0 0 0;
  49. }
  50. #logo {
  51. float:left;
  52. text-align:center;
  53. width:700px;
  54. height:146px;
  55. margin:0;
  56. }
  57. #post_content {
  58. float:left;
  59. text-align:justify;
  60. width:600px;
  61. margin:0;
  62. padding:30px 50px 30px 50px;
  63. }
  64.  
  65. -->
  66. </style>
  67. </head>
  68.  
  69. <body>
  70. <div id="container">
  71.    <div id="content" class="general">
  72.        <div id="title">
  73.        <h1>Green Newsletter</h1>
  74.        </div>
  75.        <div id="logo">
  76.        </div>
  77.        <div id="post_content">
  78.        '.$_POST['newsletter'].'
  79.        </div>
  80.    </div>
  81. </div>
  82. </body>
  83. </html>
  84. ';
  85.  
  86. //para el envío en formato HTML
  87. $headers = "MIME-Version: 1.0\r\n";
  88. $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
  89.  
  90. //dirección del remitente
  91. $headers .= "From: Green Newsletter <[email protected]>\r\n";
  92.  
  93. //dirección de respuesta, si queremos que sea distinta que la del remitente
  94. $headers .= "Reply-To: [email protected]\r\n";
  95.  
  96. //ruta del mensaje desde origen a destino
  97. $headers .= "Return-path: [email protected]\r\n";
  98.  
  99. //direcciones que recibián copia
  100. $headers .= "Cc: [email protected] \r\n";
  101.  
  102. //direcciones que recibirán copia oculta
  103. $headers .= "Bcc: [email protected] \r\n";
  104.  
  105. mail($destinatario,$asunto,$cuerpo,$headers)

creo que podrian ser algunos ajustes en los headers?, gracias de antemano por la ayuda
__________________
~# echo Hemos logrado la independencia, pero no la libertad >> SimonBolivar