Sample code for 30+ languages & platforms
Visual FoxPro

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 Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loMime

lnSuccess = 0

loMime = CreateObject('Chilkat.Mime')
lnSuccess = loMime.SetBodyFromPlainText("Message body.")
IF (lnSuccess = 0) THEN
    ? loMime.LastErrorText
    RELEASE loMime
    CANCEL
ENDIF

*  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.
loMime.CmsOptions = "{}"

*  UnwrapExtras controls whether UnwrapSecurity adds informative header fields describing the
*  security layers it removed.  The default is 1.
loMime.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.
loMime.UncommonOptions = ""

? "CmsOptions = " + loMime.CmsOptions
? "Advanced options configured."

RELEASE loMime