public void InstallMail (PersonalProfile PersonalProfile, string ID) { var SMP = MeshClient.GetApplicationProfile(ID); var MailProfile = SMP.Signed as MailProfile; MailProfile.Link(PersonalProfile); MailProfile.Private.AccountName = "Mesh-" + MailProfile.Private.AccountName; var AccountInfo = new MailAccountInfoWLM(); MailProfile.Export(AccountInfo); AccountInfo.Create(); }
/// <summary> /// Enumerate accounts in the store, creating and populating a MailAccountInfoWLM /// instance for each account. /// </summary> public override void EnumerateAccounts() { if (StoreRoot == null) return; var Directories = Directory.EnumerateDirectories(StoreRoot); foreach (var DirectoryEntry in Directories) { var AccountFiles = Directory.EnumerateFiles( DirectoryEntry, "*.oeaccount"); foreach (var AccountFile in AccountFiles) { Console.WriteLine("file:{0}", AccountFile); var Account = new MailAccountInfoWLM(AccountFile); Catalog.Accounts.Add(Account); if (Path.GetFileName(AccountFile) == DefaultMailAccount) { Catalog.DefaultWLMAccount = Account; } } } }