예제 #1
0
        public static void Main(string[] args)
        {
            POP3Connection mails = new POP3Connection(
                args[0], args[1], args[2]);

            mails.Open();
            int messcount = mails.MessageCount();

            Console.WriteLine("MESSAGES COUNT: {0}", messcount);

            foreach (short s in mails.List())
            {
                Console.WriteLine(s);
            }


            mails.Close();
        }
예제 #2
0
        public static void Main(string[] args)
        {
            POP3Connection mails = new POP3Connection(
                args[0], args[1], args[2]);

            mails.Open();
            int messcount = mails.MessageCount();

            Console.WriteLine("MESSAGES COUNT: {0}", messcount);

            POP3Message[] msgs = mails.GetMessageRange(messcount - 21, messcount - 1, false);

            foreach (POP3Message msg in msgs)
            {
                Console.WriteLine("{0} \n{1} \n{2} \n\n", msg.From.Trim(), msg.Subject.Trim(), msg.Date.Trim());
            }

            mails.Close();
        }
예제 #3
0
        public static void Main(string[] args)
        {
            POP3Connection mails = new POP3Connection(
                args[0], args[1], args[2]);

            mails.Open();
            short messcount = mails.MessageCount();

            Console.WriteLine("MESSAGES COUNT: {0}", messcount);

            short[]     q   = mails.List();
            POP3Message msg = mails.Retr(q[q.GetUpperBound(0)]);

            foreach (DictionaryEntry de in msg.Headers)
            {
                Console.WriteLine("\n***********\n{0}\n-----------\n{1}", de.Key, de.Value);
            }

            mails.Close();
        }
예제 #4
0
        public static void Main(string[] args)
        {
            POP3Connection mails = new POP3Connection(
                args[0], args[1], args[2]);

            mails.Open();
            short messcount = mails.MessageCount();

            Console.WriteLine("MESSAGES COUNT: {0}", messcount);

            short[]     q   = mails.List();
            POP3Message msg = mails.Retr(q[q.GetUpperBound(0)]);

            Console.WriteLine("MESSAGE TO:\t {0}", msg.To);
            Console.WriteLine("MESSAGE FROM:\t {0}", msg.From);
            Console.WriteLine("MESSAGE SUBJECT: {0}", msg.Subject);
            Console.WriteLine("MESSAGE DATE:\t {0}", msg.Date);
            Console.WriteLine("--- MESSAGE ---\n {0}", msg.Message);

            mails.Close();
        }