<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library" -->
<!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4"
NAME="ADODB Type Library" -->
<%
Set objMessage = Server.CreateObject("CDO.Message")
' create a new message configuration object
Set iConf = Server.CreateObject("CDO.Configuration")
With objMessage
.To = "te...@test.com"
.CC = "te...@test.com"
.From = "te...@test.com"
.Subject = "Test"
.TextBody = "test"
Set iFlds = iConf.Fields
With iFlds
.Item("urn:schemas:mailheader:X-Priority") = 1
.Item("urn:schemas:mailheader:return-path") = "bou...@test.com"
.Update
.resync
End With
.Send
end with
Set objMessage = Nothing 'release the object reference
%>
I am trying to change the return path. This code is creating a second
return-path, but the emails are being returned to the first return-path
(from address).
Can anyone show me the correct way to change the return-path using cdo?
Thanks.
Overall CDO is limited and does not allow you to do a lot of things. If
this does not work you will most likely have to go with a 3rd party
component, like The EasyMail Objects: http://www.quiksoftcorp.com/ I know
for sure that there component allows you to change this.
--
Bill Volz
"Jennifer Smith" <pool_...@hotmail.com> wrote in message
news:3E5B8219...@hotmail.com...
Thank you so much for your suggestion. What I did was add:
.sender = "bou...@test.com" to the message part, and it seems to work.
AND took out the following code:
Set iFlds = iConf.Fields
with iFlds
.Item("urn:schemas:mailheader:X-Priority") = 1
.Item("urn:schemas:mailheader:return-path") = "bou...@test.com"
.Update
.resync
End With
I have tested with an asp page, and will test with my com object.
It seems to set the return-path to the sender - exactly what I wanted.
I will test my com, and post if I still get the same results.
Thank you so much!!!!