Ver Mensaje Individual
  #4 (permalink)  
Antiguo 14/12/2009, 12:53
Alejandro_Gdl
 
Fecha de Ingreso: diciembre-2009
Mensajes: 1
Antigüedad: 14 años, 4 meses
Puntos: 0
Respuesta: ¿Se puede cargar un estilo CSS en un correo en formato HTML?

Si se puede, yo acabo de hacer un correo que se envia solo y contiene datos sacados de una base de datos.

El agregar el estilo no funciona, pero prueba con poner los estilos en la misma pagina. te dejo un ejemplo:

Código PHP:
$from "Pedido <[email protected]>";
   
$subject "Orden de compra ";
   
$message "
   <style type=\"text/css\">
<!--
body {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #333333;
}
.style1 {
    font-size: 16px;
    font-weight: bold;
}
.style2 {font-size: 14px}
.bordertabla {
    border: 1;
    border-style: solid;
    border-color: #333333;
}
.bordertabla2 {
    border: 1;
    border-color: #000000;
    border-style: solid;
    cellspacing: 0;
    cellpadding:0;
    
}
-->
</style>
<table width=\"768\" height=\"640\" class=\"bordertabla\">
  <tr>
    <td height=\"106\" width=\"252\" rowspan=\"3\"></td>
    <td height=\"106\" width=\"179\" rowspan=\"3\">&nbsp;</td>
    <td height=\"15\" width=\"193\"></td>
    <td height=\"17\" width=\"116\"></td>
  </tr>
  <tr>
    <td height=\"58\" width=\"193\"><table border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#333333\">
      <tr>
        <td width=\"183\" class=\"bordertabla\"><p align=\"center\"><strong>FECHA</strong></p></td>
      </tr>
      <tr>
        <td>$fecha</td>
      </tr>
    </table></td>
    <td height=\"58\" width=\"116\"><table width=\"115\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#333333\">
      <tr>
        <td width=\"107\"><p align=\"center\"><strong># CLIENTE</strong></p></td>
      </tr>
      <tr>
        <td>$num_cliente</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height=\"16\" width=\"193\">&nbsp;</td>
    <td height=\"16\" width=\"116\">&nbsp;</td>
  </tr>
  <tr>
    <td height=\"118\" width=\"252\" rowspan=\"5\">&nbsp;</td>
    <td height=\"19\" width=\"500\" colspan=\"3\">&nbsp;</td>
  </tr>
  <tr>
    <td height=\"20\" width=\"500\" colspan=\"3\">$nombre</td>
  </tr>
  <tr>
    <td height=\"18\" width=\"500\" colspan=\"3\">$direccion</td>
  </tr>
  <tr>
    <td height=\"20\" width=\"500\" colspan=\"3\">$ciudad</td>
  </tr>
  <tr>
    <td height=\"23\" width=\"500\" colspan=\"3\">$telefono</td>
  </tr>
  <tr>
    <td height=\"49\" width=\"252\"><table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#333333\">
      <tr>
        <td><div align=\"center\"><strong>CORREO ELECTRONICO</strong></div></td>
      </tr>
      <tr>
        <td>$mail</td>
      </tr>
    </table></td>
    <td height=\"49\" width=\"179\"><table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#333333\">
      <tr>
        <td><div align=\"center\"><strong>MODO DE ENTREGA</strong></div></td>
      </tr>
      <tr>
        <td>$select</td>
      </tr>
    </table></td>
    <td height=\"49\" width=\"315\" colspan=\"2\">&nbsp;</td>
  </tr>
  <tr>
    <td height=\"376\" width=\"758\" colspan=\"4\" valign=\"top\"><table width=\"757\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#333333\">
      <tr>
        <td width=\"135\"><div align=\"center\"><strong>CODIGO</strong></div></td>
        <td width=\"479\"><p align=\"center\"><strong>DESCRIPCIÓN</strong></p></td>
        <td width=\"121\"><p align=\"center\"><strong>CANTIDAD</strong></p></td>
      </tr>
      <tr>
        <td height=\"30\">$codp1</td>
        <td>$des1</td>
        <td>$can1</td>
      </tr>
      <tr>
        <td height=\"30\">$codp2</td>
        <td>$des2</td>
        <td>$can2</td>
      </tr>
      <tr>
        <td height=\"30\">$codp3</td>
        <td>$des3</td>
        <td>$can3</td>
      </tr>
      <tr>
        <td height=\"30\">$codp4</td>
        <td>$des4</td>
        <td>$can4</td>
      </tr>
      <tr>
        <td height=\"30\">$codp5</td>
        <td>$des5</td>
        <td>$can5</td>
      </tr>
      <tr>
        <td height=\"30\">$codp6</td>
        <td>$des6</td>
        <td>$can6</td>
      </tr>
      <tr>
        <td height=\"30\">$codp7</td>
        <td>$des7</td>
        <td>$can7</td>
      </tr>
      <tr>
        <td height=\"30\">$codp8</td>
        <td>$des8</td>
        <td>$can8</td>
      </tr>
      <tr>
        <td height=\"30\">$codp9</td>
        <td>$des9</td>
        <td>$can9</td>
      </tr>
      <tr>
        <td width=\"135\" $des10</td>
        <td width=\"121\">$can10</td>
      </tr>
    </table>
  </tr>
</table>"