Exemplo n.º 1
0
        public static List <SimpleIntro> listIntros()
        {
            List <SimpleIntro> list = new List <SimpleIntro>();
            long count = pop3Client.MessageCount;

            // Console.WriteLine(count);

            for (long i = 0; i < count; i++)
            {
                pop3Client.NextEmail();
                Console.WriteLine(pop3Client.From);

                SimpleIntro s = new SimpleIntro();
                s.title   = pop3Client.From;
                s.subject = pop3Client.Subject;
                s.pos     = i;

                /*   if (pop3Client.Body.Length >= 30)
                 * {
                 *     s.brief = pop3Client.Body.Substring(0, 30);
                 * }
                 * else s.brief = pop3Client.Body;*/
                list.Add(s);
            }
            return(list);
        }
Exemplo n.º 2
0
        public static List <SimpleIntro> listIntros()
        {
            List <SimpleIntro> list = new List <SimpleIntro>();
            long count = pop3Client.MessageCount;

            // Console.WriteLine(count);

            for (long i = 0; i < count - 4; i++)
            {
                pop3Client.NextEmail();
                Console.WriteLine(pop3Client.From);

                SimpleIntro s = new SimpleIntro();
                s.title   = pop3Client.From;
                s.subject = pop3Client.Subject;
                s.pos     = i;
                list.Add(s);
            }
            return(list);
        }