Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cdo 1.2.1
Message
From
01/02/2002 13:45:39
 
 
To
24/01/2002 18:03:35
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00610185
Message ID:
00614176
Views:
23
Hello William.

Currently I am developing an app that uses CDO 1.2.1 ("CDO.DLL"), for email sending. what I must do to send html formatted e_mail with CDO? .

As Vlad said, your best bet is to move to Cdo for Windows 2000. This is not just an upgrade from version 1.2.1. It is a total rewrite.

This code ( to be run after you instantiate the Cdo.Configuration and Cdo.Message Objects ) should help to get you started. For the rest, refer to CdoSys.chm, the help file (it ships with the MSDN library).
WITH This
  WITH .oMsg
    .Configuration = This.oConfig
    *** See if we have a sender address. 
    *** If we manually loaded the config, we may not
    IF EMPTY( NVL( .From, "" ) )
      .From = .Configuration.Fields( cdoSendEmailAddress ).value
    ENDIF
    .To = ALLTRIM( toParms.cTo )
    .CC = ALLTRIM( toParms.cCC )
    .Bcc = ALLTRIM(toParms.cBcc )
    .Subject = ALLTRIM( toParms.cSubject )
    *** See if we are sending a web page in the body of the message
    IF NOT EMPTY( toParms.cURL )
      .CreateMHTMLBody( ALLTRIM( toParms.cURL ) )
    ENDIF
    *** Add any message text to the beginning of the body
    .HTMLBody = toParms.cHTMLBody + .HTMLBody 
    *** Add any attachments
    IF NOT EMPTY( toParms.aAttachments[ 1 ] )
      lnLen = ALEN( toParms.aAttachments, 1 )
      FOR lnCnt = 1 TO lnLen
        .AddAttachment( ALLTRIM( toParms.aAttachments[ lnCnt ] ) )
      ENDFOR
    ENDIF
    .Send()
  ENDWITH
ENDWITH
Previous
Reply
Map
View

Click here to load this message in the networking platform