• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 514
  • Last Modified:

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
0
akhila75
Asked:
akhila75
  • 3
  • 3
1 Solution
 
NickRepinCommented:
Have you specified MAPI_NT_SERVICE flag for MAPIINIT_0.ulFlags in the MAPIInitialize()?
0
 
akhila75Author Commented:
No, i am not calling MAPIInitialize as it is an extended mapi call.
0
 
NickRepinCommented:
Windows NT Service Client Applications

http://msdn.microsoft.com/library/psdk/mapi/intro_2qnn.htm

INFO: Outlook Object Model Unsuitable to Run in an Windows NT Service
http://support.microsoft.com/support/kb/articles/Q237/9/13.ASP
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
akhila75Author Commented:
Is there any sample code for using extended MAPI from a NT Service?
0
 
akhila75Author Commented:
No, i am not calling MAPIInitialize as it is an extended mapi call.
0
 
NickRepinCommented:
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.


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now