Distinct offers Network Monitor, the ONLY natural language Protocol Analyzer, ONC RPC for C++, .NET and Java, and IntelliTerm, the fastest Terminal Emulator for TN3270, TN5250 and VT420 on the market.

Distinct VIT: IMAP Control: BodyPart

   Products   Downloads   Sales   Support   About us
  VIT
 



        
 

Summary

Specifies the part of a multipart MIME message to be retrieved.

Description

When fetching message data the application may want to retrieve one or more sections of the message. This property is used to specify which section.

If used, this property must be set in the OnBodyAttributes event that occurs in response to calling the Fetch or UidFetch method with the DataItems parameter containing IMAP_BODY OR IMAP_BODY_PEEK. The BodyPart property should be set to the message part to retrieve data for.

To get the header or the body of a specified part of a multipart message the BodyFlags property should be set to IMAP_MIME_PART_HEADER or IMAP_MIME_PART_BODY respectively. The BodyPart property should be set to the part of the message to retrieve.

The BodyPart property specifies the body part number that needs to be fetched. The application must specify a part only if it is trying to fetch a part of a multipart message or a message of type message/rfc822. In all the other cases the BodyPart should be set to an empty string. If the BodyFlags property is IMAP_HEADER, IMAP_HEADER_FIELDS, IMAP_HEADER_FIELDS_NOT or IMAP_TEXT then the BodyPart property is usually not used unless the application is trying to fetch the encapsulated header of message/rfc822. The BodyPart property is important when the BodyFlags property is either IMAP_MIME_PART_HEADER or IMAP_MIME_PART_BODY.

If used this property should be set at run time in the OnBodyAttributes event. There is no default value for this property.

Example

Private Sub Imap_OnBodyAttributes()

'Set the body attributes to fetch

'In response to Fetch with IMAP_BODY OR IMAP_BODY_PEEK as a DataItem

If (Part = 1) Then

Imap.BodyFlags = IMAP_MIME_PART_BODY

Imap.BodyPart = "1" ' first part

Part = Part + 1

ElseIf (Part = 2) Then

Imap.BodyFlags = IMAP_MIME_PART_BODY

Imap.BodyPart = "2" ' second part

Part = 0 ' reset

Else

Imap.BodyFlags= 0 ' done

End If

End Sub

See Also

Fetch, UidFetch methods; OnBodyAttributes event; Body Flags property



Browse FAQ

Related Products
Mail Objects

Recommended Add-On
Network Monitor,
Protocol Analyzer


Raves
"The night before I went on summer holiday we had to make some 'last minute' configuration changes to approx. 300 routers, a tedious job to do manually with telnet. We went along with MS Excel containing a list of IP-adresses to the routers, and the VIT telnet-component. One hour later the VBA-application (small is beautiful) was working, and after another hour all of our routers were updated with the new configuration. I just say a big "Thanks" to you all for a good sleep that night."
Eirik Brendholen, Ergo Integration AS

"We conducted a test session to compare the performance of similar products, and Distinct's product was better!" [more]
Dr. Shyam Sunder, Carnegie Mellon University

"Together with Distinct, we were able to offer our users an ideal soution to enabling them to connect to Yahoo! Pager, and to do so both quickly and reliably." [more]
Brian Park,
Producer of Yahoo! Pager, Yahoo! Inc.


  10/11/2008   Legal notices | PRIVACY Policy | Networking News |