SMTP Mail from Navision 5 to Navision 4

Kc_NirvanaKc_Nirvana Member Posts: 146
Hi....
It is possible to use the microsoft.navision.mail.dll registering only in the server machine?
Junior Consultant & Developer in Dynamics NAV

"I'm worse at what I do best
And for this gift I feel blessed
Our little group has always been
And always will until the end"

Nirvana - Nevermind - Smells Like Teen Spirit

Answers

  • kinekine Member Posts: 12,562
    No, you need to register it everywhere you are running NAV client which would use it...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Kc_NirvanaKc_Nirvana Member Posts: 146
    I found a solution for my specific case with the how-to in mibuso.
    CheckNavisionMail()
    CREATE(lWSHShell);
    Directory:=lWSHShell.CurrentDirectory + '\';
    IF NOT EXISTS(Directory + DLLFile) THEN BEGIN
       lSMTPMailSetup.GET;
       lSMTPMailSetup.CALCFIELDS(DLLNAvision,TLBNavision,Regasm);
    
       DLLExists:=lSMTPMailSetup.DLLNAvision.HASVALUE;
       TLBExists:=lSMTPMailSetup.TLBNavision.HASVALUE;
       RegasmExists:=lSMTPMailSetup.Regasm.HASVALUE;
       IF (NOT DLLExists) OR (NOT TLBExists) OR (NOT RegasmExists) THEN
          ERROR(Error001);
       WITH lSMTPMailSetup DO BEGIN
            DLLNAvision.EXPORT(Directory + DLLFile,FALSE);
            TLBNavision.EXPORT(Directory + TLBFile,FALSE);
            Regasm.EXPORT(Directory + RegasmFile,FALSE);
       END;
    
    lintReturn:=SHELL(Directory + RegasmFile,'/silent ' + DLLFile + ' /TLB:' + TLBFile);
    IF lintReturn <>0 THEN
       ERROR(Error002);
    END;
    

    I import to Navision the Mail DLL and TLB and the file regasm.exe
    Then create a function in CU400 to verify if the DLL is in the client.
    It is, its registered, if not them i copy and register the dll.....
    It worked for me

    Thanks anyway.
    Junior Consultant & Developer in Dynamics NAV

    "I'm worse at what I do best
    And for this gift I feel blessed
    Our little group has always been
    And always will until the end"

    Nirvana - Nevermind - Smells Like Teen Spirit
Sign In or Register to comment.