Send mail through NAS

I am trying to send mail through Navision Application Server. I have added codeUnit 397 from Navision 4 to Navision 3.70, because NV 4 works better with Outlook. When I run my codeunit from C/SIDE it’s work OK, however when it runs through NAS, I get message “Could not create an instance of the OLE control or Automation server identified by GUID={…}:‘NS Outlook Synchronization Handler’.OApplication. Check that the OLE control or Automation server is correctly installed and registered.” Does anyone know where is a problem?

You need to install the “MAPIHandler” automation server under the Tools>Custom Controls menu. wish i could remember which dll it was. try to check older posts about this topic or search google. btw. if the codeunit MAIL compiles, then its ok. It could of been CPHandler.dll file, i put up the 3.70 version to: Good luck, Annar

Annar, thanks for your help, but the CPHandler I have instaled. It is old MAPI handler from Navision 3.70. I would like to use new OLHandler.dll from Navision 4.0. With this new dll the Outlook don’t show dialog “A program is trying to acces e-mail …” and it direct send the mail. But if I compile the codeunit and if I use it in C/SIDE all is OK! Problem is just with NAS.

Hi, You would not be the first person to get strange results when using NAS!! Sorry can’t help but I can empathise!! [There is a rumoured to be a problem with running reports from NAS caused by inhereted permissions being ignored if doing say, automated posting, but the only reference I can find to the problem is on this forum - noone at MBS UK seems to be aware of it!] Only thing I can suggest is always ensure NAS windows login has administrator privilage to be on safe side, I guess you have already done this? Jon

I have the sam problem. Have you found the solution? At home I have Navision 3.60 and Outlook 2000 and it works OK. here, at work, we have Navision 3.60 and Outlook 2003 via Microsoft Exchange, and I get the same error message as you.


When I run my codeunit from C/SIDE it’s work OK, however when it runs through NAS, I get message "Could not create …

Hmm – what login account did you use? Does the NAS service use the same accout? If you login using the NAS service account, does it still work? Does the NAS service account have an Outlook profile?

Is Outlook installed on the machine the same machine that is running NAS?

I have solved the problem by using a little SMTP program instead of outlook. It has proven to be stable and I can do almost everything I need - Attach files, use CC receipents and so on. It is called SmtpMailXControl1.ocx and I think I downloaded it from a one of the navision shareware sites.