Announcement

Collapse
No announcement yet.

How to use Microsoft's CDOSYS Mail DLL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • José Roca
    replied
    See the following threads in my forum:

    http://www.jose.it-berater.org/smffo...p?topic=3076.0
    http://www.jose.it-berater.org/smffo...p?topic=2719.0

    They use my include files, available to registered members at:

    http://www.jose.it-berater.org/smffo...hp?board=344.0

    If you aren't going to use them, you will need to build includes files using a COM browser for CdoSys and ADO, and adapt the code accordingly.

    Leave a comment:


  • Hank Zucker
    started a topic How to use Microsoft's CDOSYS Mail DLL

    How to use Microsoft's CDOSYS Mail DLL

    Hi,

    I need to use Microsoft's CDO mail library cdosys.dll. I've successfully used PBCCs TCP PRINT functions for other clients, but it fails for one and we can't seem to find the problem.

    The following code works in VB6 (with different account info), but I do not know how to convert it to work in PBCC.

    Dim ObjSendMail
    Set ObjSendMail = CreateObject("CDO.Message")

    'This section provides the configuration information for the remote SMTP server.

    ObjSendMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
    ObjSendMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.arcor.com"
    ObjSendMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    ObjSendMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
    ObjSendMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

    ObjSendMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
    ObjSendMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "myacct"
    ObjSendMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "mypass"

    ObjSendMail.Configuration.Fields.Update

    'End remote SMTP server configuration section==

    ObjSendMail.To = "[email protected]"
    ObjSendMail.Subject = "This is the subject"
    ObjSendMail.From = "[email protected]"

    ObjSendMail.TextBody = "This is the body"

    ObjSendMail.Send

    I hope someone might know how to convert this code to PBCC.

    Thanks very much!

    Hank
Working...
X