Click to See Complete Forum and Search --> : A puzzle about MAPI


Eric Leung
July 20th, 2003, 10:06 PM
hey guys,
I want to build a small mail service, it can retrieves the mails from the mail server.
I have built another one like this before, it works but using SOCKET. Now I want to rewrite it by using MAPI. But I have puzzle in using this set of functions, hope your helps.
My main puzzle is how to manage the infomation of the accounts. When I look up the functions MAPILogon->MAPIFindNext->MAPIReadMail in MSDN, I can't find anything about the mail server, maybe it managed by MS OutLook ,but if I want to manage it by myself, what should I do?
Hope your helps and sample codes, thanks!

PerryBruins
August 8th, 2003, 10:28 AM
Hi,

If you want to use MAPI from a service, you will need to use MAPIInitialize and MAPILogonEx and supply appropriate parameters to run from within a service.

Logging on requires you to have a MAPI Profile setup on the computer you want to run the service on. Installing Outlook usually does this for you. The profile contains the necessary info to contact the mail server.

Perry