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