(Lianja) Extract Files from MIME
Extract files from a MIME message. Note: This example requires Chilkat v11.0.0 or greater.
llSuccess = .F.
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loMime = createobject("CkMime")
// Load a MIME document from a file:
// (.mht and .eml files contain MIME).
llSuccess = loMime.LoadMimeFile("mst.mht")
if (llSuccess = .F.) then
? loMime.LastErrorText
release loMime
return
endif
loSt = createobject("CkStringTable")
llSuccess = loMime.PartsToFiles("/temp/mimeParts",loSt)
if (llSuccess = .F.) then
? loMime.LastErrorText
release loMime
release loSt
return
endif
n = loSt.Count
// Display the paths of the files created:
i = 0
do while i < n
? loSt.StringAt(i)
i = i + 1
enddo
release loMime
release loSt
|