Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

setting return-path with cdo

938 views
Skip to first unread message

Jennifer Smith

unread,
Feb 25, 2003, 9:47:53 AM2/25/03
to
I have the following code:

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

Bill Volz

unread,
Feb 26, 2003, 2:52:23 PM2/26/03
to
The return path that most mail servers use is the address sent over in the
SMTP "MAIL FROM" command. It appears that when CDO creates the message and
places it in the pickup directory of the SMTP service it adds a x-sender:
header to the message. This is most likely the address they are using in
the "MAIL FROM" command. I am not sure if it will work but you can try
adding the x-sender: header yourself and then see if it uses that instead of
the address specified in the FROM property. If you give this a try please
let me know if it works.

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

Jennifer Smith

unread,
Feb 26, 2003, 4:19:08 PM2/26/03
to
Bill,

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

0 new messages