Click here to Skip to main content
12,634,030 members (23,718 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# .NET
We have a requirement to specify bounce address while sending the email through System.Net.Mail, I understand that this can be achived by sender property but is it the same as the email.setBounceAddress(emailAddressString) property in JavaMail API? If it is not then what is the way to do it through .Net.
Posted 24-Sep-12 20:11pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

As far as I know, the System.Net.Mail classes do not support bounce mails. I found an alternative that you may use instead:[^]
Or for ASP.NET:[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You can go through How to set the bounce address using System.Net.Mail?[^].

According to this question and discussion

To do something like this, you would need to use a 3rd party SMTP object like the one I wrote:

In aspNetEmail, you can do something like:
EmailMessage msg = new EmailMessage();
msg.ReversePath = "

aspNetEmail will use the ReversePath value in the MAIL FROM command during the SMTP Session. I could have easily of called this property "ReturnPath" or "EnvelopeFrom".
It may help...

Tadit Dash 25-Sep-12 1:57am
Thanks for accepting...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100