Setting return path and message id in Microsoft CDO for Exchange 2000

Discussion in 'ASP General' started by Emmett Power, Sep 24, 2004.

  1. Emmett Power

    Emmett Power Guest

    Hi,

    I have a newsletter that I send to customers using CDO for Exchange
    2000/Visual Basic in an Access database with Outlook 2003.

    I want to track the message id and return path to remove bounces and
    remove requests from customers. So far I have been unable to do so.

    I've tinkered with it for hours using various variations on:

    ..Item(cdoMessage-ID) = etc
    iMsg.Fields("urn:schemas:mailheader:Message-ID")
    ("urn:schemas:mailheader:message-id")

    Nothing has worked.

    The code I am using is set out below and I'm wondering it anybody can
    help me?

    Any help would be gratefully appreciated.

    Regards

    Emmett


    -------------- Start of code ------------

    Sub SendEmail()

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

    Dim iConf
    Set iConf = CreateObject("CDO.Configuration")

    Dim Flds
    Set Flds = iConf.Fields

    Dim rst
    Set rst = CurrentDb.OpenRecordset("Table", dbOpenTable)

    rst.MoveFirst

    Do Until rst.EOF

    With Flds
    ' assume constants are defined within script file
    .Item(cdoSendUsingMethod) = 2
    .Item(cdoSMTPServer) = "mail server"
    .Item(cdoSMTPConnectionTimeout) = 10
    .Item(cdoSMTPAuthenticate) = cdoBasic
    .Item(cdoSendUserName) = "user name"
    .Item(cdoSendPassword) = "pass word"
    .Item(cdoURLProxyServer) = "server:80"
    .Item(cdoURLProxyBypass) = "<local>"
    .Item(cdoURLGetLatestVersion) = True
    .Update
    End With

    With iMsg

    Set .Configuration = iConf

    .To = etc
    .Send

    End With

    rst.MoveNext

    Loop

    End Sub

    ---------- End of Code --------------------
    Emmett Power, Sep 24, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    2
    Views:
    872
    dave wanta
    Jul 11, 2003
  2. Dan Williams
    Replies:
    4
    Views:
    469
    Dan Williams
    Sep 4, 2003
  3. Roberto
    Replies:
    4
    Views:
    151
    [MSFT]
    Nov 3, 2004
  4. Jim in Arizona

    ASP/CDO Mail and Exchange 2000 on AD Domain

    Jim in Arizona, Mar 31, 2005, in forum: ASP General
    Replies:
    1
    Views:
    147
    Ray Costanzo [MVP]
    Mar 31, 2005
  5. Andyza
    Replies:
    3
    Views:
    195
    MyndPhlyp
    Oct 26, 2005
Loading...

Share This Page