I need to remove SMTP headers from from System.Net.Mail.MailMessage. Specifically, headers that contain information about the environment MailMessage originates from.
I have tried inspecting the MailMessage just before it is sent by SmtpClient, but no headers were set (they are set at a later stage).
Can this be done in .NET Framework 3.5 or do I need a 3rd-party SMTP library?
Edit: This is something that has been requested by the hosting company that hosts the website I'm working on. They say this is needed to protect information about the internal network layout.
Is this generally considered to be bad practice? What are the potential side-effects?