DISP_E_MEMBERNOTFOUND : CDO email

DISP_E_MEMBERNOTFOUND : CDO email

Postby TimStone » Fri Mar 29, 2013 7:51 pm

I put this into its own thread. This error message is being returned when trying to use CDO with an SSL email server:

DISP_E_MEMBERNOTFOUND

Here is the code. It is essentially the same as what others say works for them:

Code: Select all  Expand view



Function CDOSendMail( aTabMail )
    Local oEmailCfg,oEmailMsg

    TRY
       oEmailCfg := CREATEOBJECT( "CDO.Configuration" )
      WITH OBJECT  oEmailCfg:Fields
         :Item( "http://schemas.microsoft.com/cdo/configuration/smtpserver" ):Value :=   TRIM( aTabMail[01] ) //"mail.xxxxxxxx.com"
         :Item( "http://schemas.microsoft.com/cdo/configuration/smtpserverport" ):Value :=  aTabMail[11] // 25
         :Item( "http://schemas.microsoft.com/cdo/configuration/sendusing" ):Value := 2   // Remote SMTP = 2, local = 1
         :Item( "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ):Value :=  aTabMail[08] // .T.
         :Item( "http://schemas.microsoft.com/cdo/configuration/smtpusessl" ):Value :=  .T.
         :Item( "http://schemas.microsoft.com/cdo/configuration/sendusername" ):Value := TRIM( aTabMail[09] ) //  "xxanser@xxxxxxxx.com"
         :Item( "http://schemas.microsoft.com/cdo/configuration/sendpassword" ):Value := TRIM( aTabMail[10] ) // "xxxxxx"
         :Item( "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"):Value := 30
         :Update()
      END WITH
    CATCH oError
      MsgInfo( "Could not create message configuration" + ";"  + ;
             "Error: " + TRANSFORM(oError:GenCode, NIL) + ";" + ;
             "SubC: " + TRANSFORM(oError:SubCode, NIL) + ";" + ;
             "OSCode: " + TRANSFORM(oError:OsCode, NIL) + ";" + ;
             "SubSystem: " + TRANSFORM(oError:SubSystem, NIL) + ";" + ;
             "Message: " + oError:Description )
       Return .F.
    END
    oError:=NIL

    TRY
     oEmailMsg := CREATEOBJECT ( "CDO.Message" )
     WITH OBJECT oEmailMsg
        :Configuration =  oEmailCfg
        :From = aTabMail[02] //chr(34)+" Anser K.K. "+chr(34)+ "<anser@xxxxxxxx.com>" // This will be displayed in the From (The email id does not appear)
        :To = TRIM( aTabMail[03] ) // "xxanserkk@xxxxx.com"    // <-----   Place the TO email address
        :Subject = aTabMail[04] // "This is a Tst message"
        //:ReplyTo =  aTabMail[02] //"xxanser@xxxxxxxxx.com"
        //:Sender =  aTabMail[02] //"xxanser@xxxxxxxxx.com"  // Read Receipt message is send to this
        //:Organization =  TRIM( aTabMail[02] ) // "My xxxxxx Company"    // "My Company Name"
        :MDNRequested = .T.
        :HTMLBody =  "<HTML> " + TRIM( aTabMail[05] ) + " </HTML>"
        IF LEN( aTabMail[06] ) > 0
            For nEle := 1 To Len( aTabMail[06] )
             :AddAttachment( ALLTRIM(aTabMail[06][nEle] )) // := AllTrim( aAttach[ nEle ] )
            Next
        ENDIF
        :Send()
     END WITH
     SysRefresh()
    CATCH oError
       
       MsgInfo( "Could not send message" + ";"  + CRLF+ ;
         "Error: " + TRANSFORM(oError:GenCode, NIL) + ";" + CRLF+;
         "SubC: " + TRANSFORM(oError:SubCode, NIL) + ";" + CRLF+ ;
         "OSCode: " + TRANSFORM(oError:OsCode, NIL) + ";" + CRLF +;
         "SubSystem: " + TRANSFORM(oError:SubSystem, NIL) + ";" +CRLF+ ;
         "Message: " + oError:Description )
       Return .F.
   
    END

Return( .t. )    
 


Please note, UseSSL is true, and authentication is being passed as true.

For anyone using CDO who has had success with this, please review and let me know what might be causing the error.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: DISP_E_MEMBERNOTFOUND : CDO email

Postby Antonio Linares » Sat Mar 30, 2013 9:06 am

Tim,

In what source code line does it errors ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Re: DISP_E_MEMBERNOTFOUND : CDO email

Postby James Bott » Sat Mar 30, 2013 6:57 pm

Tim,

Maybe this thread will help:

viewtopic.php?f=3&t=15843

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: DISP_E_MEMBERNOTFOUND : CDO email

Postby James Bott » Wed Apr 03, 2013 3:41 pm

See also this thread:

viewtopic.php?f=3&t=26019
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 100 guests