Sending Email with return-path not functioning
-
29-10-2019 - |
Question
I am using System.Net.Mail
email. in the code i am setting the return-path of email as follow:
string sReturnPath = ConfigurationManager.AppSettings["ReturnPath"].ToString();
if (sReturnPath.Length > 0) {
msg.Headers.Add("Return-Path", sReturnPath);
}
If the delivery has failed it should go to return-path but it doesn't, even though I can see the header of email's return-path being from config file that I specified. The email gets returned to sender.
any ideas?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow