예제 #1
0
파일: Program.cs 프로젝트: saxx/Imapsy
        private static void Connect(string host, int port, string username, string password, string folder, bool useSsl, Action<Imap4Client, Mailbox> whatToDo)
        {
            using (var server = new Imap4Client())
            {
                var mailbox = Connect(server, host, port, username, password, folder, useSsl);

                try
                {
                    whatToDo.Invoke(server, mailbox);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                }

                server.Close();
            }
        }