Discussion:
Changing Return-Path on CDO sent mails
(too old to reply)
"" @discussions.microsoft.com>
2004-08-03 14:37:46 UTC
Permalink
Hi everybody:

I need to change the 'return-path' header of the e-mails I send using CDO in Windows 2000/2003.
I've tried to change the urn:schemas:mailheader:return-path in the mail header, but it doesn't work at all.

I think return-path is changed by the receiving MTA when the sending MTA connects to it for authenticate, but as long as I'm using the local SMTP server included with IIS I don't know how to indicate that...

I tried to use a event sink in order to change this header before sending but all was in vain. The return-path always shows the same e-mail address as the 'From' field, which is exactly what I don't want.

I've search the newsgroup in vain, and also Google News.
It seems that is not possible to acomplish this with CDO (I've found a lot of pages showing how to do it in PHP :-(, will I have to change?)

Any ideas in how to do this will be very appreciated.

Regards.

***@community.nospam
Tom Kaminski [MVP]
2004-08-03 15:20:58 UTC
Permalink
Post by "" @discussions.microsoft.com>
I need to change the 'return-path' header of the e-mails I send using CDO
in Windows 2000/2003.
Post by "" @discussions.microsoft.com>
I've tried to change the urn:schemas:mailheader:return-path in the mail
header, but it doesn't work at all.
Post by "" @discussions.microsoft.com>
I think return-path is changed by the receiving MTA when the sending MTA
connects to it for authenticate, but as long as I'm using the local SMTP
server included with IIS I don't know how to indicate that...
Post by "" @discussions.microsoft.com>
I tried to use a event sink in order to change this header before sending
but all was in vain. The return-path always shows the same e-mail address as
the 'From' field, which is exactly what I don't want.
Post by "" @discussions.microsoft.com>
I've search the newsgroup in vain, and also Google News.
It seems that is not possible to acomplish this with CDO (I've found a lot
of pages showing how to do it in PHP :-(, will I have to change?)
Post by "" @discussions.microsoft.com>
Any ideas in how to do this will be very appreciated.
What about the reply-to field?
--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
Jeff Cochran
2004-08-03 18:42:41 UTC
Permalink
It's not valid for my situation. I need to change return-path in order to get bounces to an special account I've setup.
I've achieved it using the sender property, but it is still not satisfactory because Outlook shows the bouce-back address in its addresses bar. The perfect situation for me is changing return-path so that bounced mails went to the account I set up, but inspecting the headers of the e-mail for return-path were the only thing a unser can do to see the bounced mail address.
The Return-Path can be added with something like:

cdoMessage.Headers.Add("Return-path","***@somewhere.com");

Jeff
Kurgan@community.nospam
2004-08-04 07:15:01 UTC
Permalink
Hi Jeff:

This is also not valid. I've tried to change it modifying the Fields collection of the IMessage interace (this is what you mean, I guess) and even using the EnvelopeFields collection in an event sink before sending the messages but it doesn't work.

You can achieve setting a return-path header on the message, but the receiving MTA always adds an extra return-path header that precedes yours, so it doesn't work.

Thanks anyway.
--
Loading...