Sample code for 30+ languages & platforms
PowerBuilder

Get the Entire Serialized MIME Body

See more MIME Examples

Demonstrates the Chilkat Mime.GetEntireBody method, which returns the complete serialized body of the current entity. It takes no arguments. For multipart MIME this includes the boundary delimiters and each child part's headers and body.

Note: The file paths are relative to the application's current working directory. Absolute paths may also be used. Supply the paths appropriate to your own environment.

Background: This returns everything below the entity's own headers — for a simple part, just the body; for a multipart, the whole nested structure with its boundaries and child headers. It pairs with GetEntireHead, which returns the header section, so together they let you inspect or reconstruct a message's two halves separately.

Chilkat PowerBuilder Downloads

PowerBuilder
integer li_rc
integer li_Success
oleobject loo_Mime
string ls_EntireBody

li_Success = 0

loo_Mime = create oleobject
li_rc = loo_Mime.ConnectToNewObject("Chilkat.Mime")
if li_rc < 0 then
    destroy loo_Mime
    MessageBox("Error","Connecting to COM object failed")
    return
end if
li_Success = loo_Mime.LoadMimeFile("qa_data/message.eml")
if li_Success = 0 then
    Write-Debug loo_Mime.LastErrorText
    destroy loo_Mime
    return
end if

//  Return the complete serialized body of the current entity.  For multipart MIME, this includes
//  the boundary delimiters and each child part's headers and body, but not the entity's own top
//  headers.
ls_EntireBody = loo_Mime.GetEntireBody()
if loo_Mime.LastMethodSuccess = 0 then
    Write-Debug loo_Mime.LastErrorText
    destroy loo_Mime
    return
end if

Write-Debug ls_EntireBody


destroy loo_Mime