Ejemplo n.º 1
0
        public void TestMail() {

            var MailClientCatalog = new MailClientCatalogPlatform();
            MailClientCatalog.ImportWindowsLiveMail();
            MailClientCatalog.Dump();


            var MailAccountInfo = new MailAccountInfoWLM();

            var TestName = "test-";

            MailAccountInfo.EmailAddress = TestName + "@example.com";
            MailAccountInfo.DisplayName = TestName + "- Delete";
            MailAccountInfo.AccountName = TestName;

            MailAccountInfo.Out = new Connection(
                    "smtp.example.com", 465, AppProtocol.SUBMIT, TestName, null, 
                    TLSMode.Upgrade, true);
            MailAccountInfo.In = new Connection(
                    "imap.example.com", 993, AppProtocol.IMAP4, TestName, null, 
                    TLSMode.Direct, true);

            // Dump out the data on the new account.
            MailAccountInfo.Dump ();

            MailAccountInfo.Create();

            var MailClientCatalog2 = new MailClientCatalogPlatform();
            MailClientCatalog2.ImportWindowsLiveMail();
            MailClientCatalog2.Dump();
            }
Ejemplo n.º 2
0
        public void TestLiveMail () {

            // Create test Mesh
            File.Delete(Store);
            File.Delete(Portal);
            Mesh = new Mesh(Service, Store, Portal);

            // Create Master Profile

            Mesh.CheckAccount(AccountID);
            var DevProfile = new SignedDeviceProfile(Device1, Device1Description);
            var UserProfile = new PersonalProfile(DevProfile);

            var SignedProfile = UserProfile.Signed;
            Mesh.CreateAccount(UserName, SignedProfile);

            Mesh.GetAccount(UserName);


            // Read the LiveMail accounts

            var MailClientCatalog = new MailClientCatalogPlatform();
            MailClientCatalog.ImportWindowsLiveMail();
            MailClientCatalog.Dump();

            var MailAccount = MailClientCatalog.Accounts[0];
            // Add self signed certs if they don't have them already
            MailAccount.GenerateSMIME();

            // Write out the updated profile
            MailAccount.Update();

            //// Create Mail Profile
            //var MailProfile = new MailProfile(UserProfile, MailAccount);


            // Create Test Account from Mail Profile

            var NewMailInfo = new MailAccountInfoWLM();
            //MailProfile.Export(NewMailInfo);
            NewMailInfo.AccountName = "Test-Delete";

            // Write it out
            NewMailInfo.Create();

            }