Foros del Web » Programando para Internet » PHP »

pasar variables php en email

Estas en el tema de pasar variables php en email en el foro de PHP en Foros del Web. Hola. Tengo Duda!, Estoy enviando un correo con mail(), pero en mensaje necesito pasar unas variabbles del php. (quiza sea una tontera, pero no se ...
  #1 (permalink)  
Antiguo 11/02/2005, 14:25
 
Fecha de Ingreso: octubre-2004
Ubicación: Santiago de Chile
Mensajes: 504
Antigüedad: 19 años, 5 meses
Puntos: 0
Busqueda pasar variables php en email

Hola. Tengo Duda!, Estoy enviando un correo con mail(), pero en mensaje necesito pasar unas variabbles del php. (quiza sea una tontera, pero no se me ocurre) Miren este es +- el codigo:
$mensaje = '
<html>
<head>
<title>Error en Cargas</title>
</head>
<body>
<p>&iexcl;Aqu&iacute; est&aacute;n los condoros!</p>
<table>
<tr>
<td>Don(ña):</td>
<th>';
$mensaje.= echo $_SESSION['nombre'];
$mensaje.='</th><td>Con Fecha:</td><th>'.echo $mostrar_fecha.'</th>
</tr>
<tr>
<td>Tiene los siguientes descargos</td>
<td>'.echo $texto.'</td>
</tr>
<tr>

<td>17</td>
<td>August</td>
<td>1973</td>
</tr>
</table>
</body>
</html>

';

/* Para enviar correo HTML, puede definir la cabecera Content-type. */
$cabeceras = "MIME-Version: 1.0\r\n";
$cabeceras .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* cabeceras adicionales */
//$cabeceras .= "To: Maria <[email protected]>, Kelly <[email protected]>\r\n";
$cabeceras .= "To: Departamento de Sistemas \r\n";
$cabeceras .= "From: Eror en cargas \r\n";
$cabeceras .= "Cc: [email protected]\r\n";
//$cabeceras .= "Bcc: [email protected]\r\n";

/* y ahora, enviarlo */
mail($para, $asunto, $mensaje, $cabeceras);

Atte
Maurimono
  #2 (permalink)  
Antiguo 11/02/2005, 16:59
Avatar de Nefertiter  
Fecha de Ingreso: enero-2003
Ubicación: Rosario
Mensajes: 1.316
Antigüedad: 21 años, 2 meses
Puntos: 9
sin menos preciar tu problema es realmente un tonteria
cambia el codigo a :
Código PHP:
$mensaje '
<html>
<head>
<title>Error en Cargas</title>
</head>
<body>
<p>&iexcl;Aqu&iacute; est&aacute;n los condoros!</p>
<table>
<tr>
<td>Don(ña):</td>
<th>'
;
$mensaje.= SESSION['nombre'];
$mensaje.=
'</th><td>Con Fecha:</td><th>'.$mostrar_fecha.'</th>
</tr>
<tr>
<td>Tiene los siguientes descargos</td>
<td>'
.$texto.'</td>
</tr>
<tr>
<td>17</td>
<td>August</td>
<td>1973</td>
</tr>
</table>
</body>
</html>
'

Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:12.