PowerBuilder
PowerBuilder
MIME Advanced CMS and Compatibility Option Properties
See more MIME Examples
Demonstrates advanced option properties: CmsOptions (a JSON string of advanced CMS/PKCS #7 signing and validation options), UnwrapExtras (whether UnwrapSecurity adds informative header fields describing removed security layers), and UncommonOptions (an option string for uncommon compatibility requirements).
Background. These properties adjust behavior only in specialized situations. Their defaults (empty CmsOptions, UnwrapExtras enabled, empty UncommonOptions) are correct for normal use; UncommonOptions in particular should be set only when directed by support.
Chilkat PowerBuilder Downloads
integer li_rc
integer li_Success
oleobject loo_Mime
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.SetBodyFromPlainText("Message body.")
if li_Success = 0 then
Write-Debug loo_Mime.LastErrorText
destroy loo_Mime
return
end if
// CmsOptions is a JSON string of advanced CMS/PKCS #7 signing and validation options. The default
// is an empty string, which selects normal behavior. An empty JSON object {} is also valid.
loo_Mime.CmsOptions = "{}"
// UnwrapExtras controls whether UnwrapSecurity adds informative header fields describing the
// security layers it removed. The default is 1.
loo_Mime.UnwrapExtras = 1
// UncommonOptions is a semicolon-delimited option string for uncommon compatibility requirements.
// Normal applications should leave it empty, and it should only be used when directed by support.
loo_Mime.UncommonOptions = ""
Write-Debug "CmsOptions = " + loo_Mime.CmsOptions
Write-Debug "Advanced options configured."
destroy loo_Mime