Lua
Lua
Load MIME Object from Email Object
See more Email Object Examples
Demonstrates how to load a Chilkat Mime object from a Chilkat Email object. (Copies the email into a Mime object.)Chilkat Lua Downloads
local chilkat = require("chilkat")
local email = chilkat.Email.new()
local success = email:load_eml("qa_data/eml/sample.eml")
-- Write the full MIME of the email to a StringBuilder.
local sbMime = chilkat.StringBuilder.new()
email:get_mime_sb(sbMime)
-- Load the MIME object from the StringBuilder
local mime = chilkat.Mime.new()
success = mime:load_mime_sb(sbMime)
print(mime:get_mime())