Solved

Simple MAPI and NT Service, using Outlook as MAPI client

Posted on 2000-05-11
6
458 Views
Last Modified: 2013-12-03
  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
Comment
Question by:akhila75
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:NickRepin
ID: 2802143
Have you specified MAPI_NT_SERVICE flag for MAPIINIT_0.ulFlags in the MAPIInitialize()?
0
 

Author Comment

by:akhila75
ID: 2803290
No, i am not calling MAPIInitialize as it is an extended mapi call.
0
 
LVL 15

Accepted Solution

by:
NickRepin earned 200 total points
ID: 2803310
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:akhila75
ID: 2803347
Is there any sample code for using extended MAPI from a NT Service?
0
 

Author Comment

by:akhila75
ID: 2803352
No, i am not calling MAPIInitialize as it is an extended mapi call.
0
 
LVL 15

Expert Comment

by:NickRepin
ID: 2803451
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

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question