Navision Mail

Joenmbr1Joenmbr1 Member Posts: 4
When one of my users goes to post a shipment she gets this error message:
This message is for c\AL programmers:
Could not create an instance of the OLE control or Automation server identified by
GUID={68AEAA7B-9523-3511-AF5F-F2381D2C6F04}1.0{F9DAE2A4-D2F8-37C3-86D5-E4FFE166D860}:'Microsoft Navision Mail'.SmtpMessage.
Check that the OLE control or Automation server is correctly installed and registered.

This is happening only on this machine (Win 7). We are running Nav 2009 in classic mode. Please help.

Comments

  • geordiegeordie Member Posts: 655
    Hi, first check if in that machine's NAV installation folder Microsoft.Navision.Mail.dll and Microsoft.Navision.Mail.tlb files exist (if not copy paste the from installation DVD).
    Afterwards locate the .NET framework directory and run the following command from prompt (use "Run as administator" when opening the console):
    regasm "C:\Program Files (x86)\Microsoft Dynamics NAV\60\Classic\Microsoft.Navision.Mail.dll"
    

    If the registration run smoothly then try again to post.
  • Joenmbr1Joenmbr1 Member Posts: 4
    I did exactly as you said but I'm still getting the same error message.
  • ftorneroftornero Member Posts: 310
    That is that I do to register the .DLL

    regasm.exe "Microsoft.Navision.Mail.dll" /tlb:"Microsoft.Navision.Mail.tlb" /codebase
    gacutil.exe /i "Microsoft.Navision.Mail.dll"

    And then you can check in the Automation Server List if you have this entry:
  • Joenmbr1Joenmbr1 Member Posts: 4
    This is only happening on one machine in my network. I recently upgraded this machine from XP to Windows 7. Is it possible their is a conflict between Win 7 and Navision?
  • manisharma31manisharma31 Member Posts: 285
    This message is for c\AL programmers:
    Could not create an instance of the OLE control or Automation server identified by
    GUID={68AEAA7B-9523-3511-AF5F-F2381D2C6F04}7.3{F9DAE2A4-D2F8-37C3-86D5-E4FFE166D860}:'Microsoft Navision Mail'.SmtpMessage.
    Check that the OLE control or Automation server is correctly installed and registered.

    I tried on three different machine.
    I had registered the dll file but still this error is coming.

    Did I miss something.
    Regards,
    Manish
  • ftorneroftornero Member Posts: 310
    This message is for c\AL programmers:
    Could not create an instance of the OLE control or Automation server identified by
    GUID={68AEAA7B-9523-3511-AF5F-F2381D2C6F04}7.3{F9DAE2A4-D2F8-37C3-86D5-E4FFE166D860}:'Microsoft Navision Mail'.SmtpMessage.
    Check that the OLE control or Automation server is correctly installed and registered.

    I tried on three different machine.
    I had registered the dll file but still this error is coming.

    Did I miss something.


    The message make reference to version 7.3 not 1.0, check the version installed.
  • manisharma31manisharma31 Member Posts: 285
    Yes that's correct.
    I downloaded the KB from partner source, where there is been an addition of port no. & secure connection being available in the dll for 2009 & 2009R2.

    I had registered the dll as mentioned below, but still the error remains same.
    regasm.exe "Microsoft.Navision.Mail.dll" /tlb:"Microsoft.Navision.Mail.tlb" /codebase
    gacutil.exe /i "Microsoft.Navision.Mail.dll"
    Regards,
    Manish
  • ftorneroftornero Member Posts: 310
    You can try something as simple as this :
  • manisharma31manisharma31 Member Posts: 285
    Still getting the error.

    Attached image as suggested with necessary simple coding.
    Regards,
    Manish
  • ftorneroftornero Member Posts: 310
    I running out of ideas, maybe there is a problem with the user's permissions in Windows/NAV.
  • manisharma31manisharma31 Member Posts: 285
    user is sa with super role attached.
    Regards,
    Manish
  • geordiegeordie Member Posts: 655
    The last clue I have, since you said you download the KB: can you check on dll and tlb files property, if they are blocked?
    You can see with a right click on them if in the bottom part of the window it's shown "This file came from another computer and might be blocked ...": if it's blocked press "Unblock", re-register them and try again.
    This can cause problems with .NET interoperability, perhaps applies also to automation.
  • manisharma31manisharma31 Member Posts: 285
    No its not blocked.

    Uninstalled Navision
    Unregistered the dll.
    Deleted registry value of the dll file.
    Checked in automation subtype for the dll and did not found, by running finsql from client folder.

    This time I did not installed Navision, instead I ran the finsql from client folder and checked the automation subtype and found unknown.unknown.

    Then i again register the dll as mention in my previous post, went to the codeunit 400 smtp mail, checked and selected the automation subtype.
    But when i try to send email again same error.

    I tried to change the automation to smtp.help, but the error remains same.
    Regards,
    Manish
  • ftorneroftornero Member Posts: 310
    user is sa with super role attached.

    Did you check the Windows permissions ?
  • manisharma31manisharma31 Member Posts: 285
    Still same error.
    Regards,
    Manish
  • jigneshdhandhajigneshdhandha Member Posts: 41
    Hello All

    I am trying to send mail through SMTP Mail in NAV 2009 R2 Version but I am getting below error.

    I have already registered "Microsoft.Navision.Mail.dll" with regasm and gacutil command using command prompt but When I try to send E-mail using Codeunit 400 - "SMTP Mail", it gives me error in function "Send()" as shown in attached snapshot.

    Any help or suggestion would be appreciated

    Thanks.
  • ZelwardZelward Member Posts: 1
    .net Framework 2.0 & 3.5 already installed on pc? navision mail library doesnt work with .net Framework 4.5
  • janki87janki87 Member Posts: 2
    Hi. Could anyone send me "Microsoft.Navision.Mail.dll" version 7.3 please?
    I have 7.0 but I could not use it because we need secure connection parameter.
    I googled it for some link to download it but no success.
    Thank you in advance!
  • janki87janki87 Member Posts: 2
    edited 2019-10-04
    Thank you very much @ftornero
    I managed to configure SMTP to work with secure connection parameter. :smile:

    Now I have new problem, but it is also Microsoft's Bug. After you send attachment from CU400 you can not delete that file until NAV Client is closed.

    Thank you one more time!!!
  • ftorneroftornero Member Posts: 310
    Hello @janki87,

    With this version there is a new function (Dispose) in the Automation that you could call after sending the mail to avoid that.

    Modify the codeunit 400 and add the line after the Send:
    WITH SMTPMailSetup DO
       Mail.Send("SMTP Server", "SMTP Server Port", Authentication <> Authentication::Anonymous,"User ID", Password, "Enable SSL");
    Mail.Dispose;
    

    Regards.
Sign In or Register to comment.