| Author |  | 
      
        | bgitlin Newbie
 
  
 
 Joined: 04 December 2007
 Location: United States
 Online Status: Offline
 Posts: 3
 | 
          Hello,
           | Posted: 06 July 2009 at 5:15pm | IP Logged |   |  
           | 
 |  
 I'm using MailBee.NET IMAP objects for downloading our company's email for a CRM system and it works very well most of the time, however sometimes I get the message body for the email downloaded as attachment.  Could you please explain?
 
 Here is some of my code.  I'm not putting in the whole thing because my logic for checking various things get too complicated, but this will show you what I'm doing.
 
 
 // first, i download the folders,
 // then for every folder, i search the latest UIDs and check those for duplicates
 ...
 
 // now i download the envelopes
 EnvelopeCollection downloadedEnvelopes = imap.DownloadEnvelopes(newUids.ToString(), true, EnvelopeParts.MessagePreview | EnvelopeParts.MailBeeEnvelope, 0);
 
 // then i check what messages from those envelopes to actually download
 ...
 
 // finally, this downloads the message
 EnvelopeCollection downloadedMessages = imap.DownloadEnvelopes(uidsToDownloadBatch.ToString(), true, EnvelopeParts.MessagePreview | EnvelopeParts.InternalDate | EnvelopeParts.Rfc822Size | EnvelopeParts.Envelope | EnvelopeParts.BodyStructure, -1);
 
 // then i process each downloaded message
 ...
 
 
 Thank you in advance for your assistance!
 
 Best regards,
 Boris.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Andrew AfterLogic Support
 
  
 
 Joined: 28 April 2006
 Location: United States
 Online Status: Offline
 Posts: 1189
 | 
          Please save an example of message with body as attachment as EML file and provide us for examination.
           | Posted: 07 July 2009 at 1:24am | IP Logged |   |  
           | 
 |  
 Best regards,
 Andrew
 | 
       
        | Back to Top |     | 
       
       
        |  |