i am using following code to send an email from my .NET application ,here i have added custom header X-Company. When the email is received i get this custom header properly but whenever i reply/forward this mail Custom Headers not getting back.
MailMessage message = new MailMessage(From, To);
message.Headers.Add("X-Company","xyz");
message.Body = emailMessage.ToString();
message.Subject = Subject;
message.IsBodyHtml = true;
smtp.Send(message);
This would be very hard to do across all email clients as they are free to strip away headers that they deem unnecessary when you do a reply to.
If your sole goal is to insert some key value pair and have it return back to you whenever somebody does a reply to, As you are doing HTML email you can have a hidden html element in which you have your custom header information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With