Hola, estoy intentando poner en la función para recuperar contraseña el codigo para que sea un mail en html y me da error, expongo el codigo a ver donde esta el error:
function recuperar_password($email_user,$urlweb,$nombreweb)
{
global $conexion, $database_conexion;
$cdnrecuperacion = md5(rand());
$updateSQL = sprintf("UPDATE users SET recuperar=%s WHERE email=%s",
GetSQLValueString($cdnrecuperacion, "text"),
GetSQLValueString($email_user, "text"));
$Result1 = mysql_query($updateSQL, $conexion) or die(mysql_error());
$para = $email_user;
$asunto = 'Recuperación contraseña';
$mensaje = "
<html>
<head>
<style type='text/css'>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
}
body {
color: #333;
font-family: 'Open Sans', sans-serif;
margin: 0px;
font-size: 16px;
}
.pie {
font-size:12px;
color:#999797;
}
.centro {
font-size:16px;
}
.centro a{
text-decoration:none;
color: #0487b8;
}
.centro a:hover{
text-decoration: underline;
color: #0487b8;
}
</style>
</head>
<body>
<table width='593' height='324' border='0' align='center'>
<tr>
<td> </td>
</tr>
<tr>
<td height='88'><img src='http://i.imgur.com/K1Z4rP4.png' width='115' height='40' /></td>
</tr>
<tr>
<td height='97' valign='top' class='centro'><h3>Recuperación contraseña
</h3>
Para recuperar tu contraseña utiliza este enlace '.$urlweb.'user/recuperar2.php?id='.$cdnrecuperacion.'</td>
</tr>
<tr>
<td height='17' ></td>
</tr>
<tr>
<td height='27' class='pie'>Este email es una notificación automática</td>
</tr>
</table>
</body>
</html>
";
// Cabecera que especifica que es un HMTL
$cabeceras = 'MIME-Version: 1.0' . "\r\n";
$cabeceras = "Content-type: text/html\r\n";
$cabeceras .= 'From: Phpres' . "\r\n" . //poner el domn
'Reply-To: no_contestar@phpres.net' . "\r\n";
mail($para, $asunto, $mensaje, $cabeceras);
}0
Puntos
Puntos
5571
Visitas
Visitas
2
Resp
Resp
Por borch hace 11 años
Developer
Respuesta #1
la solución esta en concatenar la cadena con doble comilla
$cadena="Para recuperar tu contraseña utiliza este enlace".$urlweb."user/recuperar2.php?id=".$cdnrecuperacion."</td>";saludos
0
Puntos
Puntos
Por zeuskx hace 11 años
Mods
Respuesta #2
gracias zeuskx, la proxima vez me fijare mejor
0
Puntos
Puntos
Por borch hace 11 años
Developer