Solved

Simple MAPI and NT Service, using Outlook as MAPI client

Posted on 2000-05-11
6
456 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now