Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/11/2008, 13:14
Avatar de hulray
hulray
 
Fecha de Ingreso: septiembre-2006
Mensajes: 630
Antigüedad: 20 años, 1 mes
Puntos: 3
mail con html

Necesito mandan un correo por mail, pero con html, intente hacer algo pero me tira un error, les dejo el codigo para que puedan ver que error cometo

muchas gracias

Código PHP:
<table width="70%" border="0">
  <tr>
    <td colspan="4"><p>Sr. MANDANTE</p>
    <p>&nbsp;
<?
include_once("../am_core/mysql.lib.php");
include_once(
"../am_config.php");
include_once(
"../am_valusu.php");
$conn = db_connect($config["host"],$config["database"],$config["user"],$config["password"]) or die( db_error() );

$nombre = $_POST['nombre'];
$email = $_POST['email'];
$empresa = $_POST['empresa'];
$fono = $_POST['fono'];
$asunt0 = $_POST['asunto'];
$mensaje1 = $_POST['mensaje1'];



$header = 'From: ' . $nombre . " \r\n";
$header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
//$header .= "Mime-Version: 1.0 \r\n";
//$header .= "Content-Type: text/plain";
$header = 'MIME-Version: 1.0' . "\r\n";
$header .= 'Content-type: text/html; charset=utf-8' . "\r\n";

$proyecto_actual= ("SELECT *, COUNT(*) AS 'ameco' FROM (am_inspeccion,am_rl_equins) where ins_folio=rei_folio GROUP BY `ins_proyecto` order by ins_folio");
  
$ret      = db_query($proyecto_actual) or die(db_error());
  
$num_resp = db_num_rows($ret);
     while( 
$row=db_fetch_array($ret) ){

      
$i            = $row["ins_folio"];
      
$nombre       = $row["ins_nomcon"];
      
$empresa       = $row["ins_nomemp"];
      
$equipo       = $row["rei_nomequ"];
      
$f_fecing1  = $row["ins_fecing1"];
      
$f_proyecto = $row["ins_proyecto"];


?>
</p></td>
  </tr>
  <tr>
    <td colspan="4"><p>Hay N&deg; 3 a espera solicitando su Aprobaci&oacute;n. A contuniaci&oacute;n detalle de las solicitudes: </p>    </td>
  </tr>
  <tr>
    <td><div align="center"><strong>Folio:</strong></div></td>
    <td><div align="center"><strong>Empresa:</strong></div></td>
    <td><div align="center"><strong>Equipo a Inspeccionar: </strong></div></td>
    <td><div align="center"><strong>Contacto:</strong></div></td>
  </tr>
  <tr>
<?  $mensaje ="<td width=\"11%\"> " . $i . "<br></td> \r\n"; ?>
<?  $mensaje
.="<td width=\"24%\"> " . $empresa . "</td> \r\n"; ?>
<?  $mensaje
.="<td width=\"39%\"> " . $equipo . "</td> \r\n"; ?>
<?  $mensaje
.="<td width=\"26%\"> " . $nombre . "</td> \r\n"; ?>
  </tr>
  <tr>
  </tr>
</table>

<?

$mensaje 
.= "Enviado el " . date('d/m/Y', time());
$mensaje .= " \r\n";
$mensaje .= " \r\n";

$para = '[email protected]';
$asunto = 'Pregunta desde la web';
}
mail($para, $asunto, utf8_decode($mensaje), $header);


//aca tira el error
?>
Parse error: parse error, unexpected $ in /home/public_html/ame_mail/prueba.php on line 82

al ultimo me tira el error