We do something similar in our own mail-enabled applications using the MAPI Controls.
First you need to check MAPI controls, make sure that you have the 32-bit MAPI DLLs installed.
* Don't try to log onto MAPI unless we can find the DLL.
declare integer GetSystemDirectory in Win32API string @, integer
lcDirectory = replicate(chr(0), 80)
lnLen = GetSystemDirectory(@lcDirectory, 80)
lcDirectory = addbs(left(lcDirectory, lnLen))
* We can find it, give a message.
if file(lcDirectory + 'MAPI32.DLL')
.oMAPISession.SignOn()
.lLoggedIn = .oMAPISession.SessionID > 0
else
messagebox('Cannot find MAPI32.DLL')
.lLoggedIn = .F.
endif not file(lcDirectory + 'MAPI3...
Hope this helps.