I’d like to know how to retrieve the addresses contained in the “envelope-to” header of a MailMessage.
For example, when I receive an e-mail aimed to more than 50 recipients, it’s sometimes cut in several e-mail, each containing every original recipient in the “to” header but only the 50 max recipients of the current part in the “envelope-to” header.
You may also view all the headers contained in the message by using a for loop as follows: foreach (string key in message.Headers.AllKeys) { Console.WriteLine(key + ": " + message.Headers.Get(key)); }
All the recipients should also be visible using MailMessage.To collection.