[C++] [MAPI] Open a message store !
Hi,
I'm trying to send mail via MAPi on a smartphone, with the SDK Sample "SendMail" i can send put mail in the activesync message store but the mail had to be send on smartphone synchronisation with a PC running Outlook !
I use this code :
while (SUCCEEDED(pTable->QueryRows(1, 0, &psrs)) && (posted < 1)) for(unsigned int i=0; i<psrs->aRow[0].cValues; ++i) _LOG(TEXT(""),0); // Open this message store, the bug must comes from here ! EXIT_ON_FAILED(hr); // Now get the Drafts folder. In order for a message to be sent by MAPI, it must be created hr = pStore->OpenEntry(rgprops[0].Value.bin.cb, EXIT_ON_FAILED(hr); // Now set the some properties on the message.... // attach a file // Now send the message rgprops = NULL; RELEASE_OBJ(pmsg); |
The probleme is that i really don't know how to put my mail in an other account, i can read account names but i can't use them, i guess the answer is near this line
// Open this message store, the bug must comes from here ! hr = pSession->OpenMsgStore(NULL, psrs->aRow[0].lpProps[0].Value.bin.cb, (ENTRYID *)psrs->aRow[0].lpProps[0].Value.bin.lpb, NULL, 0, &pStore); |
But i really don't know how opn a specific message store.
Some one can help me ?

