Could not create an instance of the OLE control :SmtpMessage

RoddyMcLeanRoddyMcLean Member Posts: 101
In spite of registering the following dll


I'm still getting the error message


when trying to create a message (SMTP Mail)
CreateMessage(SenderName : Text[100];SenderAddress : Text[50];Recipients : Text[1024];Subject : Text[200];Body : Text[1024];HtmlFormatt
IF Recipients <> '' THEN
  CheckValidEmailAddresses(Recipients);
CheckValidEmailAddresses(SenderAddress);
SMTPMailSetup.GET;
SMTPMailSetup.TESTFIELD("SMTP Server");
IF ISCLEAR(Mail) THEN
  CREATE(Mail);    //** fails here **

Any ideas, Thanks.
Roddy

Comments

  • ShinigamiShinigami Member Posts: 2
    i have the same error and i don't know how to solve it...
    i'm tryng to copy all the "smtp procedure" to a 4.0 sp3 version...
    any help would be appreciated!!

    ---edit

    i don't know why but today it works... maybe the server restarted this night?

    this is what i've done this morning (just to retry what i've already done yesterday) and it seems to work now... (copied from cmd prompt)

    C:\Windows\Microsoft.NET\Framework\v2.0.50727>regasm "c:\Program Files (x86)\Microsoft Business Solutions-Navision\Client\Microsoft.Navision.Mail.dll" /tlb:"c:\Program Files (x86)\Microsoft Business Solutions-Navision\Client\Microsoft.Navision.Mail.tlb"

    Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.4927 Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.

    Types registered successfully
    Assembly exported to 'c:\Program Files (x86)\Microsoft Business Solutions-Navision\Client\Microsoft.Navision.Mail.tlb', and the type library was registered successfully

    C:\Windows\Microsoft.NET\Framework\v2.0.50727>



    i hope it could help you
    Lend me your strength and i'll give you mine
Sign In or Register to comment.