Set MAIL FROM (Return-Path:) without setting Sender: header in email

I am writing a .NET application that will send out thousands of email notifications (no, not spam) on behalf of our clients. I am (currently) planning on sending these through an Exchange server, and that requires NTLM authentication, so I have chosen System.Net.Mail.SmtpClient as my class.

In order to track the bounces for our client, I need to ensure that the Return-Path: header reflects our email address, (while of course the From: header reflects our client's address).  This is done by setting the MailMessage.Sender property.  The problem is, in addition to using that as the MAIL FROM, it also adds a "Sender:" header to the email.  The side-effect of this Sender: header is that now the email reads as "From: <venderemail> ON BEHALF OF <clientemail>".  This of course is not what the client wants.  The email should appear to come from them.

I know that this can legitimately be done, because I've tested it using telnet and constructing my own message.  I just need a .NET class to do it so it can handle the NTLM authentication and mime encoding, etc..

If possible I don't want to have to purchase a third party piece of software, and as I've stated I would also like to avoid writing my own SMTP client.
LVL 1
N1njaB0bAsked:
Who is Participating?
 
N1njaB0bConnect With a Mentor Author Commented:
I have determined that this cannot be done using the built-in System.Net.Mail.SmtpClient class.  If anybody is interested, I ended up using third-party Chilkat software.
0
 
bhagwantsinghCommented:
Did you try System.Net.Mail.MailMessage.ReplyTo and System.Net.Mail.MailMessage.Sender property?
0
 
N1njaB0bAuthor Commented:
The .ReplyTo property does not set the MAIL FROM.  The .Sender property does set the MAIL FROM, but unfortunately also sets the Sender: header, which I do not want.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.