Examples of deleteMessage()


Examples of org.apache.commons.net.pop3.POP3Client.deleteMessage()

           
            assertTrue(client.login("valid", "valid"));
            POP3MessageInfo[] info = client.listMessages();
            assertEquals(2, info.length);
           
            assertTrue(client.deleteMessage(1));
            info = client.listMessages();
            assertEquals(1, info.length);

           
            assertFalse(client.deleteMessage(1));
View Full Code Here

Examples of org.apache.commons.net.pop3.POP3Client.deleteMessage()

            assertTrue(client.deleteMessage(1));
            info = client.listMessages();
            assertEquals(1, info.length);

           
            assertFalse(client.deleteMessage(1));
            info = client.listMessages();
            assertEquals(1, info.length);
           
           
            assertTrue(client.deleteMessage(2));
View Full Code Here

Examples of org.apache.commons.net.pop3.POP3Client.deleteMessage()

            assertFalse(client.deleteMessage(1));
            info = client.listMessages();
            assertEquals(1, info.length);
           
           
            assertTrue(client.deleteMessage(2));
            info = client.listMessages();
            assertEquals(0, info.length);
           
            // logout so the messages get expunged
            assertTrue(client.logout());
View Full Code Here

Examples of org.apache.commons.net.pop3.POP3Client.deleteMessage()

            POP3Client client =  createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
           
            assertTrue(client.login("valid", "valid"));
            assertEquals(1, client.listMessages().length);
            assertTrue(client.deleteMessage(1));
            assertEquals(0, client.listMessages().length);
           
            // call RSET. After this the deleted mark should be removed again
            assertTrue(client.reset());
            assertEquals(1, client.listMessages().length);
View Full Code Here

Examples of org.apache.commons.net.pop3.POP3Client.deleteMessage()

            POP3Client client =  createClient();
           
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertNull(client.listMessages());
            assertNull(client.listUniqueIdentifiers());
            assertFalse(client.deleteMessage(1));
            assertNull(client.retrieveMessage(1));
            assertNull(client.retrieveMessageTop(1, 10));
            assertNull(client.status());
            assertFalse(client.reset());
            client.logout();
View Full Code Here

Examples of org.apache.commons.net.pop3.POP3Client.deleteMessage()

            reader.close();
            assertNotNull(client.status());
            reader = client.retrieveMessageTop(1, 1);
            assertNotNull(reader);
            reader.close();
            assertTrue(client.deleteMessage(1));
            assertTrue(client.reset());

            assertTrue(client.logout());

        } finally {
View Full Code Here

Examples of org.apache.commons.net.pop3.POP3Client.deleteMessage()

            reader = client.retrieveMessage(10);
            assertNull(reader);
           
           
            // delete and check for the message again, should now be deleted
            assertTrue(client.deleteMessage(1));
            reader = client.retrieveMessage(1);
            assertNull(reader);

           
            assertTrue(client.logout());
View Full Code Here

Examples of org.apache.commons.net.pop3.POP3Client.deleteMessage()

            // does not exist
            reader = client.retrieveMessageTop(10,100);
            assertNull(reader);
           
            // delete and check for the message again, should now be deleted
            assertTrue(client.deleteMessage(1));
            reader = client.retrieveMessageTop(1, 1000);
            assertNull(reader);

            assertTrue(client.logout());
          
View Full Code Here

Examples of org.apache.commons.net.pop3.POP3Client.deleteMessage()

                        ByteArrayInputStream bais = new ByteArrayInputStream(buffer.toString().getBytes());
                        Properties prop = new Properties();
                        Session session = Session.getDefaultInstance(prop, null);

                        mimeMsg = new MimeMessage(session, bais);
                        pop3.deleteMessage(messages[j].number);
                        break;
                    }
                    buffer = null;
                }
            }
View Full Code Here

Examples of org.apache.james.imapserver.store.ImapMailbox.deleteMessage()

        if ( store.getChildren( toDelete ).isEmpty() ) {
            long[] uids = toDelete.getMessageUids();
            for ( int i = 0; i < uids.length; i++ ) {
                long uid = uids[i];
                SimpleImapMessage imapMessage = toDelete.getMessage( uid );
                toDelete.deleteMessage( imapMessage.getUid() );
            }
            store.deleteMailbox( toDelete );
        }
        else {
            if ( toDelete.isSelectable() ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.