r4gn0
07-09-2008, 10:18 AM
Hi, im trying to send php variables in a mail that has an html table, the mail arrives but without body!!! can someone tell me whats wrong with this??
<?php
require_once('../Connections/principal.php');
$miconexion = new Db("redes","localhost","userred","passred");
$idcliente=$_GET['cliente'];
$fecha = date("d-M-y");
$fechan = $fecha;
$texto=$_GET['texto'];
$prioridad=$_GET['prioridad'];
$temp=$miconexion->consulta("SELECT cliente FROM usuario WHERE id='$idcliente'");
while ($row=mysql_fetch_row($temp))
{
$nombre=$row['0'];
}
$norden=$miconexion->consulta("SELECT num_orden FROM orden");
while ($row=mysql_fetch_row($norden))
{
$nun_orden=$row['0'] + 1;
}
$miconexion->consulta("INSERT INTO orden VALUES ('".$idcliente."','".$nombre."','".$nun_orden."','".$texto."','".$prioridad."','".$fecha."','".$fechan."')");
$contenido='
<html>
<head>
<title>Confirmación de Registro de Usuario/title>
</head>
<body>
<table width="600" border="1">
<tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">El usuario <b>'.$nombre.'</b> ha reportado el siguiente problema:</font></td>
</tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="/* 003366">'.$texto.'</font></td>
<tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">la prioridad para este es: <b>'.$prioridad.'</b></font></td>
</tr>
<tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">El problema fue reportado el día:'.$fecha.'</font></td>
</tr>
</table>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="/* FF0000">Por favor no responda este correo ya que nadie lo recibirá</font>
</body>
</html>';
$cabeceras = 'MIME-Version: 1.0' . "\r\n";
$cabeceras .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
$cabeceras .= 'From: Mecatronics Ltda < noreply@mecatronicsltda.com >' . "\r\n";
mail ("Ingenieros de Soporte < mail@mail.com >", "Solicitud Servicio",$contenido,$cabeceras);
header ("location: ../clientes/clientes.php");
<?php
require_once('../Connections/principal.php');
$miconexion = new Db("redes","localhost","userred","passred");
$idcliente=$_GET['cliente'];
$fecha = date("d-M-y");
$fechan = $fecha;
$texto=$_GET['texto'];
$prioridad=$_GET['prioridad'];
$temp=$miconexion->consulta("SELECT cliente FROM usuario WHERE id='$idcliente'");
while ($row=mysql_fetch_row($temp))
{
$nombre=$row['0'];
}
$norden=$miconexion->consulta("SELECT num_orden FROM orden");
while ($row=mysql_fetch_row($norden))
{
$nun_orden=$row['0'] + 1;
}
$miconexion->consulta("INSERT INTO orden VALUES ('".$idcliente."','".$nombre."','".$nun_orden."','".$texto."','".$prioridad."','".$fecha."','".$fechan."')");
$contenido='
<html>
<head>
<title>Confirmación de Registro de Usuario/title>
</head>
<body>
<table width="600" border="1">
<tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">El usuario <b>'.$nombre.'</b> ha reportado el siguiente problema:</font></td>
</tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="/* 003366">'.$texto.'</font></td>
<tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">la prioridad para este es: <b>'.$prioridad.'</b></font></td>
</tr>
<tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">El problema fue reportado el día:'.$fecha.'</font></td>
</tr>
</table>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="/* FF0000">Por favor no responda este correo ya que nadie lo recibirá</font>
</body>
</html>';
$cabeceras = 'MIME-Version: 1.0' . "\r\n";
$cabeceras .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
$cabeceras .= 'From: Mecatronics Ltda < noreply@mecatronicsltda.com >' . "\r\n";
mail ("Ingenieros de Soporte < mail@mail.com >", "Solicitud Servicio",$contenido,$cabeceras);
header ("location: ../clientes/clientes.php");