Question

just trying to work my way around using Redemption; I've got the following code to retrieve the RDOAccounts (Email accounts) from the default Profile:

Profiles profiles = (Profiles)Activator.CreateInstance(Type.GetTypeFromProgID("ProfMan.Profiles"));
Profile defaultProfile = profiles.DefaultProfile;           
//open a RDOSession for this profile
RDOSession session = RedemptionLoader.new_RDOSession();
session.Logon(defaultProfile.Name);
RDOAccounts accounts = session.Accounts;

Where I'm stuck is trying to determine which of the RDOAccount objects is set as the default email account - there doesn't seem to be any property on the object that I can use to see whether it's the default or not.

Anyone done this before?

Was it helpful?

Solution

Use RDOSession.Accounts collection, in particular RDOAccounts.GetOrder method: http://www.dimastr.com/redemption/RDOAccounts.htm

OTHER TIPS

I think this works - but if anyone's got a more elegant solution I'd love to hear it!

RDOAccount defaultAccount = session.GetDefaultFolder(rdoDefaultFolders.olFolderInbox).Store.StoreAccount;            
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top