Hunny Software Library Reference

BodyStructureData.BodyPart Method 

Gets the BODYSTRUCTURE item at the specified position.

[Visual Basic]
Public Function BodyPart( _
   ByVal index As Integer _
) As BodyStructureData
[C#]
public BodyStructureData BodyPart(
   int index
);

Parameters

index
The position of the BODYSTRUCTURE item.

Return Value

The BODYSTRUCTURE item at the specified position.

Remarks

BODYSTRUCTURE structures in an IMAP4 FETCH response may be nested. This is how the server returns information about multipart messages or multipart body parts. For example, if a messages contains multiple body parts, then the BODYSTRUCTURE structure for that message contains a nested BODYSTRUCTURE structure for each body part it contains.

The library parses nested BODYSTRUCTURE structures and creates a corresponding tree of BodyStructureData instances.

Call this method to get the BodyStructureData instance at a specified index position. To learn how many BodyStructureData instances this instance contains, get the value of the NumBodyParts property.

The parameter index must satisfy 0 <= index < NumBodyParts.

See Also

BodyStructureData Class | Hunny.Mail Namespace