Inheritance: Goedel.Mesh.MailClientCatalog
Example #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();
            }
 /// <summary>
 /// Search local application configuration files to discover account 
 /// details.
 /// </summary>
 /// <returns>List of the accounts found.</returns>
 public static List<MailAccountInfo> FindLocal () {
     var MailClientCatalog = new MailClientCatalogPlatform();
     MailClientCatalog.ImportWindowsLiveMail();
     return MailClientCatalog.Accounts;
     }
Example #3
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();

            }
 /// <summary>
 /// Construct an integrator for the specified catalog and enumerate the accounts.
 /// </summary>
 /// <param name="Catalog">Mail account catalog to add to.</param>
 public IntegrateLiveMail(MailClientCatalogPlatform Catalog) {
     this.Catalog = Catalog;
     EnumerateAccounts();
     }