Link to home
Start Free TrialLog in
Avatar of akhila75
akhila75

asked on

Simple MAPI and NT Service, using Outlook as MAPI client

  Is it possible to send mails from a NT service using Simple MAPI.
   We do not have exchange server.
   I have written a NT Service. Its start up parameter is set for
   "Administrator"
   When Run, MAPISendMail returns success.
    But the mail is not sent. [it is present in outbox] and Microsoft outlook
    hangs when closed.
   This happens only with Microsoft exchage and Outlook mail client.
 
   [Mails are sent when Outlook express and Netscape messanger are used
   as MAPI client]
   
    Why is Outlook hanging? should i use extended mapi.
     THe mail server is sendmail on linux
    Could somebody please suggest some solution to this problem
    or give pointers to some urls    
  TIA,
Akhila
Avatar of NickRepin
NickRepin

Have you specified MAPI_NT_SERVICE flag for MAPIINIT_0.ulFlags in the MAPIInitialize()?
Avatar of akhila75

ASKER

No, i am not calling MAPIInitialize as it is an extended mapi call.
ASKER CERTIFIED SOLUTION
Avatar of NickRepin
NickRepin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Is there any sample code for using extended MAPI from a NT Service?
No, i am not calling MAPIInitialize as it is an extended mapi call.
There is no significant difference between using of extended MAPI as the ordinary application and as the service.

But you have to:

1) Specify MAPI_NT_SERVICE flag for MAPIINIT_0.ulFlags in the MAPIInitialize()

2) Do not use any user interface in your program like message boxes etc.