Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/06/2008, 17:59
sheilac
 
Fecha de Ingreso: abril-2007
Mensajes: 59
Antigüedad: 17 años
Puntos: 0
link borrar suscripcion newsletter

hola
tengo una duda.
tengo hecho un newsletter que se envia a los clientes en un sitio.
El hecho es que me piden les ponga un link donde el cliente se puede borrar de esa suscripcion.
Si no quiere recibir más este newsletter,
clickee aquí y lo sacaremos de nuestra base de datos.
Esto es para que si se quieren bajar de la base mande un mail… entonces la idea es que manden un mail y que en el subject diga “ Solicito la baja del Newsletter”.

este es el principio del envio del newsletter
Código PHP:


if(isset($_POST['enviar'])){        


        $bdsubs = new db($host,$user,$pass);
        $bdsubs->db_connect();
        $bdsubs->db_select_db($db);
 
   
        $bdsubs->db_sql_select('*','users','1=1','','');
        $bdsubs->db_execute_query();

        $bd = new db($host,$user,$pass);
        $bd->db_connect();
        $bd->db_select_db($db);
 
   
        $bd->db_sql_select('*','newsletter','1=1','','');
        $bd->db_execute_query();
        
        $row = $bd->get_next_row();
        $enviado=true;
        $body="<html><head>
<title>:: ::</title>

<script type='text/JavaScript'>

</head>
<body marginwidth='0' marginheight='0' onLoad='MM_preloadImages('../images/3kzOf.gif')'>
<table width='525' border='0' align='center' cellpadding='0' cellspacing='0'>
  <tr>
    <td height='50'>&nbsp;</td>
  </tr>
  <tr>
    <td>
    
    <table width='100%' border='0' cellspacing='0' cellpadding='0'>
                                
      <tr>
        <td width='275'><img src='../images/LogoNews.jpg' width='200' height='165'></td>
        <td valign='top' style='font-family: Georgia, 'Times New Roman', Times, serif; font-size:10px; color:#61676b; padding-top:42px;'><a href='#' style='text-decoration:none; color:#61676b'>Si no ve correctamente el mensaje, haga clic aqu&iacute; </a></td>
      </tr>
    </table></td>
  </tr>
  
  <tr>
    <td height='60' align='left' valign='middle' style='font-family: Georgia, 'Times New Roman', Times, serif; font-size:30px; color:#1c4665; letter-spacing:-2px; border-bottom:#bebebe solid 1px;'>".$row['titulo']."</td>
  </tr>
  
  <tr>
    <td style='font-family: Georgia, 'Times New Roman', Times, serif; font-size:11px; line-height:18px; color:#61676b; font-weight: bold;'>
     </td>
  </tr>
  <tr>
    <td height='30'>&nbsp;</td>
  </tr>
  <tr>
    <td style='font-family: Georgia, 'Times New Roman', Times, serif; font-size:11px; line-height:18px; color:#61676b;'> ".$row['cuerpo']."</td>
  </tr>
  <tr>
    <td height='30' style='border-bottom:#bebebe solid 1px;'>&nbsp;</td>
  </tr>
  <tr>
    <td height='20'>&nbsp;</td>
  </tr>
  <tr>
    <td><table width='100%' border='0' cellspacing='0' cellpadding='0'>
      <tr>
       
      </tr>
    </table></td>
  </tr>
  
  <tr>
    <td height='20' style='border-bottom:#bebebe solid 1px;'>&nbsp;</td>
  </tr>
  <tr>
    <td height='20'>&nbsp;</td>
  </tr>
  <tr>
    <td style='font-family: Georgia, 'Times New Roman', Times, serif; font-size:10px; line-height:14px; color:#acacac;'> <a href='#' style='text-decoration:none; color:#acacac;'>Si no quiere recibir m&aacute;s este newsletter, <br>
  clickee aqu&iacute; y lo sacaremos de nuestra base de datos. </a></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
</form>
<? 
   
}
  
}

?>
</body>
</html>
"
    ;
luego viene toda la parte del enviar.
si alguien me puede orientar o sabe de algun ejemplo en internet
muchas gracias