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

E

Emmett Power

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 --------------------
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top