| Author |  | 
      
        | nwebster Newbie
 
  
 
 Joined: 12 April 2005
 Location: United States
 Online Status: Offline
 Posts: 9
 | 
          Right now I am using a windows service to read in e-mails and write the data to a sql server. I know I can use the attachments collection to get each individual attachment and save it off, but is it possible to save the body of the message with the attachments embedded in them all as part of one big message?
           | Posted: 12 April 2005 at 4:14pm | IP Logged |   |  
           | 
 |  
 Does this make sense?
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          Yes, you can save the message completely as one big chunk of data using RawBody property of Message object. It returns the entire message data as String.
           | Posted: 13 April 2005 at 8:32am | IP Logged |   |  
           | 
 |  
 
 
| Code: 
 
    
    | 
      
       | Set Msg = POP3.RetrieveSingleMessage(1)
 strData = Msg.RawBody
 
 |  |  |  
 RawBody is also writable. It means you can create Message object and then assign RawBody from external source, thus loading the message from a string.
 
 
 
| Code: 
 
    
    | 
      
       | Set Msg = CreateObject("MailBee.Message")
 Msg.RawBody = strData
 MsgBox Msg.Attachments.Count
 
 |  |  |  
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  |