Bengt
this is a piece from Ideals doc on MAPI issues
obviously it has to be a 32 bit MAPI compliant mail client
Code:
There are some problems with MAPI. Some vendors of MAPI clients (e-mail software) do not set up the registry correctly. The problems are sometimes very heavy and difficult to solve. In the following we list the problems we heared about:
32-bit VPE on Win-32 (9x / ME, NT >= 4.0 / 2000 / XP) platform
MAPI clients are not correctly registered. The guideline is, that the following entry must be present in the registry for all 32-bit platforms listed above:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows Messaging Subsystem \ MAPI = 1
But for NT <= v4.00 there has to be the following entry in the WIN.INI in the section [Mail]:
[Mail]
MAPI = 1
VPE checks for all conditions above, but some MAPI clients do not setup the registry as they should.
To cure the problem listed above, we implemented the following solution:
VPE checks for the guideline rules first and returns VMAPI_INSTALLED if they are matched. Otherwise VPE will check for a WIN.INI entry (yes!) which is made by some clients in the [Mail] section:
[Mail]
MAPIX = 1
If this entry is found, VPE will return VMAPI_UNSURE, because it is not 100% sure that a 32-bit MAPI client is really installed. Otherwise VPE will return VMAPI_NOT_INSTALLED. If you are sure there is a working MAPI client on the machine, but the registry key is missing, you can add it manually or let this perform by your setup software.
The e-mail toolbar button and the method MailDoc()
The e-mail button will be enabled for the condition VMAPI_INSTALLED and will be disabled (grayed) for the conditions VMAPI_UNSURE and VMAPI_NOT_INSTALLED.
You have the chance to re-enable the e-mail button after calling OpenDoc() , if you are sure a working MAPI client is installed (see VpeEnableMailButton).
The method MailDoc() will work for all conditons (i.e. it is not blocked), but for VMAPI_NOT_INSTALLED and VMAPI_UNSURE you call it on your own risc.