From: shoeb on
I need to fetch any e email account name configured in outlook and invoke
the outlook with a file attatched. Like in following code I have hardcoded
the account name("eb") but I need to fetch it programmatically.
TCHAR cmd[]=L"-service \"eb\" -to \"eb81(a)gmail.com\" -subject \"Photos\"";
CreateProcess(_T("tmail.exe"), cmd, NULL, NULL, FALSE, NULL, NULL, NULL,
NULL, NULL);

Any help will be highly appreciated.
Thanks & Regards
Shoeb

From: Peter Foot [MVP] on
The supported way of retrieving account settings is through the EMAIL2
configuration service provider. Perform a root-level query to return all
email accounts:-
http://msdn.microsoft.com/en-us/library/bb737664.aspx

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility

"shoeb" <syedshoeb81(a)hotmail.com> wrote in message
news:825F91F4-B4A6-4714-A275-64559F28675A(a)microsoft.com...
> I need to fetch any e email account name configured in outlook and invoke
> the outlook with a file attatched. Like in following code I have hardcoded
> the account name("eb") but I need to fetch it programmatically.
> TCHAR cmd[]=L"-service \"eb\" -to \"eb81(a)gmail.com\" -subject \"Photos\"";
> CreateProcess(_T("tmail.exe"), cmd, NULL, NULL, FALSE, NULL, NULL, NULL,
> NULL, NULL);
>
> Any help will be highly appreciated.
> Thanks & Regards
> Shoeb