| Author |  | 
      
        | randy Newbie
 
  
 
 Joined: 09 June 2006
 Online Status: Offline
 Posts: 1
 | 
          I know I can use msg.GetHeader(header name) to get a value for a specific header entry. Is there a way to get a list of all the header names for a specific message (or to put it another way, a list of all the values I can pass to msg.getHeader)?
           | Posted: 09 June 2006 at 12:39am | IP Logged |   |  
           | 
 |  
 Thanks!
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          In MailBee Objects the developer can't get a list of all message headers, except that he
           | Posted: 09 June 2006 at 7:37am | IP Logged |   |  
           | 
 |  will parse message raw body manually. Nevertheless, MailBee.NET Objects has much greater functionality and flexibility.
 
 In MailBee.NET Objects all message headers are stored in headers collection. Thus, the developer can iterate through collection to get all headers.
 
 MailMessage msg = new MailMessage();
 msg.LoadMessage(@"c:\test.eml");
 
 // Iterate through headers collection
 for (int i = 0; i < msg.Headers.Count; i++)
 {
 Console.WriteLine(string.Format("{0} : {1}", msg.Headers[i].Name, msg.Headers[i].Value));
 }
 
 We provide 50% discount off MailBee.NET Objects price for all registered users of previous versions of MailBee products. If you interested in this, please contact us at support@afterlogic.com e-mail address.
 
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  |