RompeRatones
Registrado: 20 Sep 2005 Mensajes: 65
| Publicado: 02/03/2008 2:35 am | | | Título: |
| | Código: | german@mafalda:~$ python Python 2.4.4 (#2, Jan 3 2008, 13:53:47) [GCC 4.2.3 20071123 (prerelease) (Debian 4.2.2-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import poplib >>> correo=poplib.POP3("pop.mail.yahoo.com.ar") >>> correo.user("germangutierrez78") '+OK password required.' >>> correo.pass_("MIPASSWORD") '+OK maildrop ready, 56 messages (8895940 octets) (24678648 2547777536)' >>> correo.list() ('+OK 56 messages (8895940 octets)', ['1 12246', '2 2669', '3 6968185', '4 1705579', '5 18924', '6 8412', '7 5108', '8 3099', '9 4397', '10 5049', '11 18335', '12 3016', '13 4588', '14 7953', '15 5213', '16 5132', '17 2857', '18 5215', '19 5163', '20 7941', '21 4651', '22 4451', '23 4632', '24 7950', '25 12956', '26 5252', '27 5175', '28 5219', '29 5137', '30 5184', '31 10763', '32 5134', '33 5151', '34 5300', '35 5244', '36 5114', '37 5120', '38 5126', '39 5121', '40 1492', '41 12434', '42 3583', '43 2046', '44 8052', '45 2598', '46 2606', '47 14597', '48 12410', '49 6454', '50 12404', '51 8704', '52 1478', '53 1450', '54 1437', '55 1464', '56 1473'], 510)
|
##luego para leer algun correo puedo hacer un correo.retr(NUMERO) ##donde NUMERO es un numero de 1 a 56 (la cantidad de mensajes que ##tengo en mi casilla) la legibilidad de cada correo estara dada por la ##estructura MIME del correo en si, un mensaje en texto plano siempre ##va a ser mas legible a un correo que use html
| Código: | >>> correo.retr(32) ('+OK 5134 octets', ['X-Apparently-To: via 68.142.200.139; Fri, 29 Feb 2008 17:25:43 -0800', 'X-Originating-IP: [206.190.56.44]', 'Authentication-Results: mta253.mail.re4.yahoo.com from=cc.yahoo-inc.com; domainkeys=pass (ok)', 'Received: from 206.190.56.44 (HELO n4a.bullet.re4.yahoo.com) (206.190.56.44)', ' by mta253.mail.re4.yahoo.com with SMTP; Fri, 29 Feb 2008 17:25:42 -0800', 'Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys', 'DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=fz10; d=cc.yahoo-inc.com;', '\tb=i+mo3qEeW/XHlqFUlGZ8AWKJRycrp6ep+3+etOv7yYwihBOhrrLRC9YF+/8HKqbnZD2j1FqVmU5WxQmhzUpvcpSOZd7qyUbk03x2JN4aXVLEJZNvvJJgWfAay3gRm0BqYSfXQl9lE2MpK6298rVOQCy3ULlNTdfLMm1SWzWqivI=;', 'Received: from [68.142.237.87] by n4.bullet.re4.yahoo.com with NNFMP; 01 Mar 2008 01:25:42 -0000', 'Received: from [216.252.107.89] by t3.bullet.re3.yahoo.com with NNFMP; 01 Mar 2008 01:25:42 -0000', 'Date: 29 Feb 2008 17:25:42 -0800', 'Received: from [127.0.0.1] by adm1.answers.search.re4.yahoo.com with NNFMP; 01 Mar 2008 01:25:42 -0000', 'MIME-Version: 1.0', 'Content-type: text/html; charset=utf-8', 'X-Yahoo-Newman-Id: rI1HVLet', 'From: =?UTF-8?B?WWFob28hIFJlc3B1ZXN0YXMg?= <answers-alert@cc.yahoo-inc.com>', 'Subject: =?UTF-8?B?WWFob28hIFJlc3B1ZXN0YXM6IFR1IHJlc3B1ZXN0YSBoYSBzaWRvIGVsZWdpZGEgbGEgbWVqb3IuIA==?= ', 'To: ', '', '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">', '<html>', '<head>', ' <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">', '</head>', '<body>', '', '<p align="center" style="font-size: 80%; font-family: arial;"><a href=\'http://es.answers.yahoo.com/\'>¿Estás buscando respuesta a tus preguntas? ¡Entra en Yahoo! Respuestas!</a></p>', '', '\t<table border="0" width="571" align="center" cellpadding="0" cellspacing="0" style="padding: 0px; margin: 0px auto; width: 571px; font-family: arial; color: #333; font-size: 90%;"> <tr><td colspan="2"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/sch/gr2/baemail_top.gif" width="572" height="5"></td></tr><tr><td colspan="2" style="background-color: #54c40a; text-align: left; padding-left: 5px;"><img src="http://eur.i1.yimg.com/eur.yimg.com/i/es/se/an/rlogo1.gif" ></td></tr><tr><td style="border-left: 1px #54c40a solid; vertical-align: top;"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/sch/gr/bestanswer_emailphoto.jpg" width="235" height="295"></td><td style="border-right: 1px #54c40a solid;text-align: left; padding: 0px 15px 0px 15px; vertical-align: top;">', '', '\t<p style="margin: 5px; color: #333; font-size: 120%; font-weight: bold;">¡Ey, RompeRatones, mira lo que haces!</p>', '\t<p style="margin: 5px; color: #e88a35; font-size: 115%; font-weight: bold;">Enhorabuena. Tu respuesta ha sido elegida la mejor y has ganado 10 puntos.</p>', '\t<p style="margin: 5px;">La respuesta que diste para esta pregunta dio en el clavo y ha sido elegida como la mejor:</p>', '\t<p style="margin: 5px;"><a href="http://es.answers.yahoo.com/question/?qid=20080220174140AAdh5us" style="color: #3399cc; ">Alguien sabe como etiketar un cd???????????</a></p>', '\t<p style="margin: 5px; margin-top: 8px;">Enhorabuena. Saborea la victoria. Sal a celebrarlo. Presume un poco.', '\tY luego vuelve y responde unas cuantas preguntas más.</p>', '\t<p style="margin: 10px 0px 10px 2px;">', '\t\t<a href="http://es.answers.yahoo.com/question/?qid=20080220174140AAdh5us"><img src="http://eur.i1.yimg.com/eur.yimg.com/i/es/se/an/baeml.gif" border="0" alt="Ir a Yahoo! Respuestas"></a>', '\t</p>', '\t<p style="margin: 5px;">Gracias por compartir lo que sabes y alegrarle el día a alguien.</p>', '\t<p style="margin: 5px;"><strong>El equipo de Yahoo! Respuestas</strong></p>', '\t\t', '\t\t</td></tr><tr><td colspan="2" style="background-color: #e1f1cb; border-top: 1px #54c40a solid; border-left: 1px #54c40a solid; border-right: 1px #54c40a solid; text-align: left; padding: 5px 5px 2px 5px;"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/sch/gr/y!bang.jpg" width="36" height="27" valign="middle" style="display: inline; vertical-align: middle;"><p style="display: inline; vertical-align: middle; font-size: 80%; padding-left: 10px;">Consigue la <a href="http://es.toolbar.yahoo.com/?.cpdl=ansr">Barra de Herramientas de Yahoo!</a> para llegar a Respuestas con un solo click.</p></td></tr><tr><td colspan="2"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/sch/gr2/baemail_btm.gif" width="572" height="5"></td></tr></table>', '\t', '<br><br><span style="font-size: 8pt;">No respondas a este mensaje. Este es un correo referido a tu uso de Yahoo! Respuestas. Para saber más sobre el tratamiento de tu información personal por parte de Yahoo!, incluyendo los <a href="http://privacy.yahoo.com/privacy/es/index.html">web beacons</a> en los mensajes HTML, consulta nuestra <a href="http://privacy.yahoo.com/privacy/es/index.html">Política de privacidad</a>. Yahoo! Respuestas está en C/María de Molina 40, 5ª planta, 28006, Madrid. <br><br>Copyright © Yahoo! Todos los derechos reservados. <a href="http://es.docs.yahoo.com/info/utos.html">Condiciones de Servicio</a>.</span>', '</body>', '</html>'], 5134)
|
### seguramente hay funciones para presentar todo mas bonito, per aun mucho no me he puesto a jugar con esto _________________
|
|