Beispiel #1
0
        public static void Main()
        {
            POP3_Client Mailbox = new POP3_Client(new IntegratedSocket("pop.yourisp.com", 110), "yourusername", "yourpassword");

            Mailbox.Connect();
            Debug.Print("Message count: " + Mailbox.MessageCount.ToString());
            Debug.Print("Box size in bytes: " + Mailbox.BoxSize.ToString());

            uint[] Id, Size;
            Mailbox.ListMails(out Id, out Size);
            for (int Index = 0; Index < Id.Length; ++Index)
            {
                string[] Headers = Mailbox.FetchHeaders(Id[Index], new string[] { "subject", "from", "date" });
                Debug.Print("Mail ID " + Id[Index].ToString() + " is " + Size[Index].ToString() + " bytes");
                Debug.Print("Subject: " + Headers[0]);
                Debug.Print("From: " + Headers[1]);
                Debug.Print("Date: " + Headers[2]);
                Debug.Print("======================================================================");
            }

            Mailbox.Close();
        }