Risolto, <br><br><br>import poplib, mimetypes, email, os<br>ServerPop = poplib.POP3(&#39;<a href="http://pop.tiscali.it">pop.tiscali.it</a>&#39;)<br>ServerPop.user(&quot;<a href="mailto:xxx@tiscali.it">xxx@tiscali.it</a>&quot;)<br>
ServerPop.pass_(&quot;xxx&quot;)<br>Cartella = &#39;.&#39; # directory where to save attachments (default: current)<br>NumeroMessaggi = len(ServerPop.list()[1])<br>for Messaggio in range(NumeroMessaggi):<br>    MessaggioCompleto = email.message_from_string(&#39;\r\n&#39;.join(ServerPop.retr(Messaggio+1)[1]))<br>
    print &quot;-&quot;*30<br>    #print MessaggioCompleto<br>    print &quot;-&quot;*30<br>    if MessaggioCompleto.get_content_maintype() != &#39;multipart&#39;:<br>        continue<br>    print &quot;[&quot;+MessaggioCompleto[&quot;From&quot;]+&quot;] :&quot; + MessaggioCompleto[&quot;Subject&quot;]<br>
    print &quot;Inviato da: &quot; + MessaggioCompleto[&quot;From&quot;]<br>    print &quot;Oggetto: &quot; +MessaggioCompleto[&quot;Subject&quot;]<br>    #<br>    for part in MessaggioCompleto.walk():<br>        # multipart are just containers, so we skip them<br>
        if part.get_content_maintype() == &#39;multipart&#39;:<br>            continue<br>        if part.get(&#39;Content-Disposition&#39;) is None:<br>            continue<br>        filename = part.get_filename()<br>        counter = 1<br>
        if not filename:<br>            filename = &#39;part-%03d%s&#39; % (counter, &#39;bin&#39;)<br>            counter += 1<br>        att_path = os.path.join(Cartella, filename)<br>        if not os.path.isfile(att_path) :<br>
            # finally write the stuff<br>            fp = open(att_path, &#39;wb&#39;)<br>            fp.write(part.get_payload(decode=True))<br>            fp.close()<br>    if (raw_input(&quot;Cancello? (S/N) &quot;) == &quot;S&quot;):<br>
        #ServerPop.dele(Messaggio)<br>        print &quot;Prossimo messaggio&quot;<br>ServerPop.quit()<br><br><div class="gmail_quote"><span dir="ltr"></span><br></div><br>