コード例 #1
0
ファイル: TestNetMAPI.cs プロジェクト: shahshyam/MapiEx
        static void Main(string[] args)
        {
            if (NetMAPI.Init())
            {
                NetMAPI mapi = new NetMAPI();
                if (mapi.Login())
                {
                    StringBuilder strText = new StringBuilder(NetMAPI.DefaultBufferSize);
                    if (mapi.GetProfileName(strText)) Console.WriteLine("Profile Name: " + strText);
                    if (mapi.GetProfileEmail(strText)) Console.WriteLine("Profile Email: " + strText);

                    if (mapi.OpenMessageStore())
                    {
                        // uncomment the functions you're interested in and/or step through these to see how each thing works.
//                         SendTest(mapi);
//                         SendCIDTest(mapi);
//                         FolderTest(mapi);
                         ReceiveTest(mapi);
//                         ContactsTest(mapi);
//                         CopyMessageTest(mapi);
//                        MoveMessageTest(mapi);
//                         DeleteMessageTest(mapi);
//                         AppointmentTest(mapi);
                    }
                    mapi.Logout();
                }
                NetMAPI.Term();
            }
            Console.ReadLine();
        }