Hola Amigos del foro.
Tengo un problema al enviar un mail desde php. Estoy haciendo uso de mail(), y todo funciona bien cuando envio un html normal o solo texto; pero no se envia nada cuando en el contenido le agrego datos obtenidos desde una bd mysql. No se si el problema está en la programacion o en mi hosting, agradezco mucho su ayuda. Este es el codigo.
// email_stock.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
p {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
p em {
color: #FF6600;
}
a {
color: #FF6600;
text-decoration: none;
padding-bottom: 2px;
border-bottom-width: 1px;
border-bottom-style: dotted;
border-bottom-color: #8A5300;
}
strong {
color: #663300;
font-weight: bold;
}.Estilo13 {
color: #006699;
font-weight: bold;
}
.Estilo14 {color: #FFFFFF}
.Estilo16 {font-size: 12px}
.Estilo17 {font-size: 11px}
.Estilo18 {
font-family: Tahoma;
font-size: 13px;
}
-->
</style>
</head>
<body>
<p>[*MENSAJE*]</p>
<br />
<br />
<table border="0" cellpadding="0" cellspacing="1">
<tr height="33">
<td style="background-color: #996633; width: 78px; heigh: 20px; text-align: center; font-family: Arial,sans-serif; font-size: 11px; color: #DEBE9E;"><div align="center" class="Estilo13 Estilo14 Estilo16" >
<div align="left">Country</div>
</div></td>
<td style="background-color: #996633; width: 130px; heigh: 20px; text-align: center;font-family: Arial,sans-serif; font-size: 11px; color: #DEBE9E;"><div align="center" class="Estilo13 Estilo14">
<p align="left" class="Estilo16">Grade</p>
</div></td>
<td style="background-color: #996633; width: 91px; height: 30; text-align: center; font-family: Arial,sans-serif; font-size: 11px; color: #DEBE9E;"><div align="center" class="Estilo13 Estilo14 Estilo16">
<div align="left">Quantity</div>
</div></td>
<td style="background-color: #996633; width: 137px; height: 30; text-align: center; font-family: Arial,sans-serif; font-size: 11px; color: #DEBE9E;"><div align="center" class="Estilo13 Estilo14 Estilo16">
<div align="left">Price</div>
</div></td>
<td style="background-color: #996633; width: 110px; height: 30; text-align: center; font-family: Arial,sans-serif; font-size: 11px; color: #DEBE9E;"><div align="center" class="Estilo13 Estilo14 Estilo16">
<div align="left">Shippig Date <br />
</div>
</div></td>
<td style="background-color: #996633; width: 40px; height: 30; text-align: center; font-family: Arial,sans-serif; font-size: 11px; color: #DEBE9E;"><div align="center" class="Estilo13 Estilo14 Estilo16">
<div align="left">Quality<br />
</div>
</div></td>
<td style="background-color: #996633; width: 95px; height: 30; text-align: center; font-family: Arial,sans-serif; font-size: 11px; color: #DEBE9E;"><div align="center" class="Estilo13 Estilo14 Estilo16">Altitude</div></td>
<td style="background-color: #996633; width: 150px; height: 30; text-align: center; font-family: Arial,sans-serif; font-size: 11px; color: #DEBE9E;"><div align="center" class="Estilo13 Estilo14 Estilo16">Specifications</div></td>
</tr>
[*BODY*]
</table>
<p><a href="http://www.tropicalmountains.com"><img src="http://img11.imageshack.us/img11/8412/tropizx5.jpg" border="0" alt="Image Hosted by ImageShack.us"/></a><br/></p>
<table width="100%" border="0">
<tr>
<td><span class="Estilo18">Celular: +51-1-992924894<br />
Fijo: +41-78878-3222<br />
[email protected]<br />
Skype: schweglerthomas<br />
MSN:
[email protected]<br />
<br />
You can also see this offer list online at: <br />
<a href="http://www.tropicalmountains.com/stockprices.php">www.tropicalmountains.com/stockprices.php</a><br />
<br />
Note: All offers and prices are subject to reconfirmation</span></td>
</tr>
</table>
</body>
</html>
En el siguiente mensaje pongo la prte 2.