Click here to Skip to main content
15,896,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

As far as I know, the System.Net.Mail classes do not support bounce mails. I found an alternative that you may use instead:
http://www.afterlogic.com/mailbee-net/email-components[^]
Or for ASP.NET:
http://www.aspnetemail.com/[^]
 
Share this answer
 
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:

http://www.aspnetemail.com

In aspNetEmail, you can do something like:
C#
EmailMessage msg = new EmailMessage();
msg.ReversePath = "bounceEmailAccountHere@whatever.com

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

Thanks...
 
Share this answer
 
v3
Comments
Thanks for accepting...

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900