title: IMAP - ENVELOPE vs. RFC822 headers, Fetching whole message vs body parts, etc
body: <p>I'm writing an IMAP client and I have a question.</p>
  
  <p>To get Sender, From, To, CC, etc -</p>
  
  <p>I can FETCH RFC822.HEADER , which will give me a long string w/sometimes not relevant information, or I can FETCH ALL / FETCH ENVELOPE, which will give me a nice formatted version of the main info I need, which is Date, Subject, Sender, etc.  </p>
  
  <p>To get email message / attachments -</p>
  
  <p>I can FETCH BODY.PEEK[], which will give me a MIME string with every part of the message regardless of whether I want it (nor does it give the MIME boundaries in an easy to read parse format like BODYSTRUCTURE does), or I can FETCH BODYSTRUCTURE / FETCH (BODY ENVELOPE), then parse out the individual parts I want/need, without having to download everything.</p>
  
  <p>My question is whether using the rfc822 headers, or downloading an entire MIME string, is every really necessary in an email client? It seems like BODYSTRUCTURE &amp; ENVELOPE have made this much easier, so is there any reason I would ever need to manually parse the RFC822 headers / MIME message in my email client? I should be able to do everything a client would ever need with ENVELOPE &amp; BODYSTRUCTURE, correct?</p>
  
  <p>Thank you.</p>