Mime Delphi DLL Reference Documentation
Mime
Current Version: 11.5.0
Chilkat.Mime
Build MIME content programmatically or load existing MIME from strings,
files, byte data, or other application sources.
Read, add, replace, or remove MIME headers, set body content, and control
content types, charsets, and transfer encodings.
Create and inspect multipart MIME trees such as mixed, alternative,
related, signed, encrypted, and nested MIME structures.
Add, locate, extract, remove, or inspect MIME parts and attachments,
including filenames and encoded body data.
Sign, verify, encrypt, decrypt, unwrap, and inspect PKCS7/CMS S/MIME
layers using certificates and private keys.
Emit MIME text, save MIME to files, or convert MIME to and from XML for
structured inspection, transformation, or storage.
For an extended overview, see
Mime Class Overview.
Build, parse, modify, serialize, secure, and inspect MIME and S/MIME data.
Mime provides low-level MIME and S/MIME handling for
applications that need direct control over MIME structure, headers, body
content, encodings, multipart relationships, attachments, and PKCS7/CMS
security layers. It can load, create, inspect, modify, serialize, and save
MIME messages; build multipart structures; manage headers and content-transfer
encodings; extract attachments; convert MIME to and from XML; and sign,
verify, encrypt, decrypt, or unwrap S/MIME content.
Create and load MIME
Headers and body content
Multipart structures
Attachments and parts
S/MIME security
Serialization and XML
Mime when an application needs low-level control
over MIME parts, headers, encodings, multipart layout, or S/MIME security.
For ordinary email composition and message-level operations, use
Chilkat.Email; use Mime when you need to work
closer to the raw MIME structure.
Mime object has no headers or child parts. Its string serialization consists only of the blank header/body separator (CRLF CRLF) until content is added.LoadMimeBd and GetMimeBd when arbitrary 8-bit bytes or embedded NUL bytes must be preserved.
Create/Dispose
var myObject: HCkMime; begin myObject := CkMime_Create(); // ... CkMime_Dispose(myObject); end;
Creates an instance of the HCkMime object and returns a handle (i.e. a Pointer). The handle is passed in the 1st argument for the functions listed on this page.
Objects created by calling CkMime_Create must be freed by calling this method. A memory leak occurs if a handle is not disposed by calling this function.
Properties
Boundary
procedure CkMime_putBoundary(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__boundary(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the raw boundary token used by a multipart MIME entity. Do not include surrounding quotation marks.
Content-Type: multipart/mixed; boundary="example-boundary"For this example,
Boundary is example-boundary. Chilkat automatically quotes the parameter when the token contains characters such as spaces or semicolons.
NewMultipartMixed, NewMultipartAlternative, and NewMultipartRelated generate a nonempty boundary.Content-Type parameter.See the notes about PWideChar memory ownership and validity.
Charset
procedure CkMime_putCharset(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__charset(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the charset parameter of the Content-Type header field.
Content-Type: text/plain; charset=utf-8Changing this property preserves the media type and other parameters. Setting it when no
Content-Type exists creates a Content-Type field, although the media type remains empty until ContentType is set.
Encoding controls the MIME transport representation of those bytes.Charset to an empty string does not remove the parameter. It selects the platform default ANSI charset; on Windows this is typically windows-1252.See the notes about PWideChar memory ownership and validity.
CmsOptions
procedure CkMime_putCmsOptions(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__cmsOptions(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets a JSON string containing advanced CMS/PKCS #7 signing and validation options. The empty string selects normal behavior. This property is intended for specialized interoperability requirements; applications should leave it empty unless a documented option is specifically needed.
See the notes about PWideChar memory ownership and validity.
topContentType
procedure CkMime_putContentType(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__contentType(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the MIME media type of the current part, excluding all parameters. Supply a value such as text/plain, text/html, application/pdf, or multipart/mixed; do not include charset, boundary, or other parameters in this property.
Changing the media type preserves the existing charset and unrecognized parameters, but may remove parameters that are specific to the previous media type, such as format=flowed. Setting an empty string leaves an empty media type and can therefore produce an invalid-looking header if other parameters remain.
IsText, IsImage, and IsMultipart classify the media type stored here. Parameters must be set through their dedicated properties or header attributes, not appended to ContentType.See the notes about PWideChar memory ownership and validity.
CurrentDateTime
function CkMime__currentDateTime(objHandle: HCkMime): PWideChar; stdcall;
Returns the current local date and time formatted as an Internet message date, including the numeric UTC offset. For example:
Fri, 21 Nov 1997 09:55:06 -0600
See the notes about PWideChar memory ownership and validity.
DebugLogFilePath
procedure CkMime_putDebugLogFilePath(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__debugLogFilePath(objHandle: HCkMime): PWideChar; stdcall;
If set to a file path, this property logs the LastErrorText of each Chilkat method or property call to the specified file. This logging helps identify the context and history of Chilkat calls leading up to any crash or hang, aiding in debugging.
Enabling the VerboseLogging property provides more detailed information. This property is mainly used for debugging rare instances where a Chilkat method call causes a hang or crash, which should generally not happen.
Possible causes of hangs include:
- A timeout property set to 0, indicating an infinite timeout.
- A hang occurring within an event callback in the application code.
- An internal bug in the Chilkat code causing the hang.
See the notes about PWideChar memory ownership and validity.
Disposition
procedure CkMime_putDisposition(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__disposition(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the disposition value from the Content-Disposition header field, excluding parameters such as filename.
Content-Disposition: attachment; filename="report.pdf"Changing this property preserves an existing
filename parameter. Typical values are attachment and inline.See the notes about PWideChar memory ownership and validity.
Encoding
procedure CkMime_putEncoding(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__encoding(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the value of the Content-Transfer-Encoding header field for the current part. Common values include base64, quoted-printable, 7bit, 8bit, and binary.
GetBodyEncoded returns the transfer-encoded form, while GetBodyBd, GetBodyBinary, and SaveBody return or save decoded bytes.See the notes about PWideChar memory ownership and validity.
Filename
procedure CkMime_putFilename(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__filename(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the filename parameter of the Content-Disposition header field. The value is a receiver-facing filename, not a local filesystem path.
Changing this property preserves the disposition value but removes other Content-Disposition parameters such as size. Setting an empty string removes the filename parameter.
filename=. When reading a header containing both filename= and filename*=, this property returns filename=. Use GetHeaderFieldAttribute to retrieve the raw filename* value.See the notes about PWideChar memory ownership and validity.
LastErrorHtml
function CkMime__lastErrorHtml(objHandle: HCkMime): PWideChar; stdcall;
Provides HTML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.
See the notes about PWideChar memory ownership and validity.
topLastErrorText
function CkMime__lastErrorText(objHandle: HCkMime): PWideChar; stdcall;
Provides plain text information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.
See the notes about PWideChar memory ownership and validity.
LastErrorXml
function CkMime__lastErrorXml(objHandle: HCkMime): PWideChar; stdcall;
Provides XML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.
See the notes about PWideChar memory ownership and validity.
topLastMethodSuccess
procedure CkMime_putLastMethodSuccess(objHandle: HCkMime; newPropVal: wordbool); stdcall;
Indicates the success or failure of the most recent method call: True means success, False means failure. This property remains unchanged by property setters or getters. This method is present to address challenges in checking for null or Nothing returns in certain programming languages. Note: This property does not apply to methods that return integer values or to boolean-returning methods where the boolean does not indicate success or failure.
Micalg
procedure CkMime_putMicalg(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__micalg(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the micalg parameter of a multipart/signed Content-Type header field.
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="example-boundary"The parameter advertises the message-integrity algorithm used by the detached signature. When creating a signature, prefer setting
SigningHashAlg; Chilkat generates the corresponding micalg value.See the notes about PWideChar memory ownership and validity.
topName
procedure CkMime_putName(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__name(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the name parameter of the Content-Type header field. For attachments, Filename is generally the primary receiver-facing name.
Setting a non-ASCII value causes Chilkat to emit an RFC 2047 encoded-word in the name= parameter. Setting this property when no media type exists creates a Content-Type field with an empty media type.
See the notes about PWideChar memory ownership and validity.
NumDecryptCerts
Returns the number of decryption certificates recorded by the most recent call to UnwrapSecurity. Use LastDecryptCert with a zero-based index to retrieve each certificate.
NumHeaderFields
Returns the number of header-field occurrences in the current part. Duplicate names count separately and retain their order. Valid indexes range from 0 through NumHeaderFields - 1 for use with GetHeaderFieldName and GetHeaderFieldValue.
During MIME parsing, duplicate ordinary fields are retained. Duplicate Content-Type fields are collapsed, with the last value taking effect.
NumParts
Returns the number of direct child parts. It does not include deeper descendants. Iterate from 0 through NumParts - 1 and call PartAt to traverse the tree.
The object returned by PartAt provides live access to the stored child. Modifying that returned object modifies the parent MIME tree.
NumSignerCerts
Returns the number of signer certificates recorded by the most recent signature-verification or security-unwrapping operation. The property is populated by UnwrapSecurity. Use LastSignerCert to retrieve a certificate by zero-based index.
OaepHash
procedure CkMime_putOaepHash(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__oaepHash(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the hash algorithm used by RSAES-OAEP when encrypting the CMS content-encryption key. Supported values are sha1, sha256, sha384, and sha512. This property is used only when OaepPadding is True.
See the notes about PWideChar memory ownership and validity.
OaepMgfHash
procedure CkMime_putOaepMgfHash(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__oaepMgfHash(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the hash algorithm used by the mask generation function (MGF1) within RSAES-OAEP. Supported values are sha1, sha256, sha384, and sha512. The default is sha1. This property is used only when OaepPadding is True.
See the notes about PWideChar memory ownership and validity.
topOaepPadding
procedure CkMime_putOaepPadding(objHandle: HCkMime; newPropVal: wordbool); stdcall;
Selects the RSA key-transport padding used when creating encrypted MIME. The default is False, which uses RSAES-PKCS1-v1_5. Set to True to use RSAES-OAEP.
Pkcs7CryptAlg.Pkcs7CryptAlg
procedure CkMime_putPkcs7CryptAlg(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__pkcs7CryptAlg(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the symmetric content-encryption algorithm used when creating CMS/PKCS #7 encrypted MIME. Supported values are aes, aes-gcm, des, 3des, and rc2. The default is aes. The aes-gcm option was added in version 10.0.0.
Pkcs7KeyLength selects its key length.See the notes about PWideChar memory ownership and validity.
Pkcs7KeyLength
procedure CkMime_putPkcs7KeyLength(objHandle: HCkMime; newPropVal: Integer); stdcall;
Gets or sets the content-encryption key length, in bits, used when creating CMS/PKCS #7 encrypted MIME. The permitted value depends on Pkcs7CryptAlg.
| Algorithm | Accepted key lengths |
|---|---|
aes or aes-gcm | 128, 192, or 256 |
3des | 192 |
des | 40 |
rc2 | 40, 56, 64, or 128 |
Protocol
procedure CkMime_putProtocol(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__protocol(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the protocol parameter of the Content-Type header field. This parameter is commonly used by multipart/signed to identify the media type of the detached signature part.
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="example-boundary"For this example,
Protocol is application/pkcs7-signature.See the notes about PWideChar memory ownership and validity.
topSigningAlg
procedure CkMime_putSigningAlg(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__signingAlg(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the RSA signature scheme used when creating CMS/PKCS #7 signed MIME. The default is PKCS1-v1_5. Set the property to RSASSA-PSS or pss to use RSASSA-PSS.
This setting applies only when the signing private key is RSA. It does not select the signature scheme for EC or DSA keys. The property controls signature creation and is not updated during verification; use GetLastJsonData to inspect a verified signature.
See the notes about PWideChar memory ownership and validity.
SigningHashAlg
procedure CkMime_putSigningHashAlg(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__signingHashAlg(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets the message-digest algorithm used when creating CMS/PKCS #7 signatures. Supported values are sha1, sha256, sha384, sha512, md5, and md2.
This property controls signature creation only. It is not changed when a signature is verified. After verification, call GetLastJsonData to inspect the algorithms found in the signed data.
sha256 unless interoperability with a legacy system requires otherwise. MD2, MD5, and SHA-1 are retained for compatibility with older signed messages.See the notes about PWideChar memory ownership and validity.
topUncommonOptions
procedure CkMime_putUncommonOptions(objHandle: HCkMime; newPropVal: PWideChar); stdcall;
function CkMime__uncommonOptions(objHandle: HCkMime): PWideChar; stdcall;
Gets or sets a semicolon-delimited or implementation-specific option string used for uncommon compatibility requirements. The default is the empty string, and normal applications should leave it empty. Options placed here may be version-specific and should be used only when directed by Chilkat documentation or support.
See the notes about PWideChar memory ownership and validity.
topUnwrapExtras
procedure CkMime_putUnwrapExtras(objHandle: HCkMime; newPropVal: wordbool); stdcall;
Controls whether UnwrapSecurity adds informative header fields describing the security layers that were removed. The default behavior should normally be retained unless the application requires a minimally modified unwrapped MIME message.
UseMmDescription
procedure CkMime_putUseMmDescription(objHandle: HCkMime; newPropVal: wordbool); stdcall;
Controls whether Chilkat uses the conventional multipart preamble text This is a multi-part message in MIME format. when serializing a multipart entity. The default is False. The preamble is meaningful only when the multipart has content and is ignored by MIME-aware readers.
UseXPkcs7
procedure CkMime_putUseXPkcs7(objHandle: HCkMime; newPropVal: wordbool); stdcall;
Controls whether newly created S/MIME media types use the historical x-pkcs7 names.
| Value | Generated media types |
|---|---|
True (default) | application/x-pkcs7-mime and application/x-pkcs7-signature |
False | application/pkcs7-mime and application/pkcs7-signature |
x- forms are widely encountered in existing S/MIME messages. Both naming forms describe the same CMS/PKCS #7 content.VerboseLogging
procedure CkMime_putVerboseLogging(objHandle: HCkMime; newPropVal: wordbool); stdcall;
If set to True, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. The default value is False. Verbose logging should only be used for debugging. The potentially large quantity of logged information may adversely affect peformance.
Version
function CkMime__version(objHandle: HCkMime): PWideChar; stdcall;
Version of the component/library, such as "10.1.0"
See the notes about PWideChar memory ownership and validity.
Methods
AddContentLength
Computes the byte length of the current entity's serialized MIME body and adds or updates its Content-Length header. The count is based on the transfer-encoded serialized body, not the decoded payload.
For a multipart entity, the count includes boundary delimiter lines, child headers, child bodies, and the closing boundary. Only the current entity's header is updated; child parts do not receive Content-Length fields. Repeated calls recompute the value and leave a single header occurrence.
AddDecryptCert
Adds cert to the internal collection of certificates available for S/MIME decryption. The certificate must have access to its corresponding private key. Call this method once for each candidate certificate.
The collection is searched by decryption methods such as Decrypt and UnwrapSecurity. Other ways to provide decryption credentials include AddPfxSourceFile, AddPfxSourceBd, and UseCertVault.
Returns True for success, False for failure.
topAddDetachedSignature
Creates an S/MIME detached signature using cert. The certificate must have access to its private key. On success, the current object becomes a multipart/signed entity with two direct children:
| Part | Contents |
|---|---|
| First | The original MIME entity being signed. |
| Second | The CMS/PKCS #7 signature data. |
Use SigningHashAlg and, for RSA keys, SigningAlg to select the signing algorithms.
Returns True for success, False for failure.
AddDetachedSignature2
cert: HCkCert;
transferHeaderFields: wordbool): wordbool; stdcall;
Creates the same detached multipart/signed structure as AddDetachedSignature, with transferHeaderFields controlling whether the calling object's header fields are transferred to the first, signed content part while the outer multipart wrapper is created.
cert is the signing certificate and must have access to its private key.
Returns True for success, False for failure.
topAddDetachedSignaturePk
cert: HCkCert;
privateKey: HCkPrivateKey): wordbool; stdcall;
Creates a detached S/MIME signature using cert as the signer certificate and privateKey as its associated private key. Use this method when the certificate and private key are supplied separately rather than combined in a PFX/P12 file or certificate object.
On success, the current object is transformed into the same two-part multipart/signed structure described by AddDetachedSignature.
Returns True for success, False for failure.
AddDetachedSignaturePk2
cert: HCkCert;
privateKey: HCkPrivateKey;
transferHeaderFields: wordbool): wordbool; stdcall;
Creates a detached S/MIME signature using the certificate in cert and the corresponding private key in privateKey. transferHeaderFields controls whether the calling object's header fields are transferred to the first, signed content part while the outer multipart/signed wrapper is created.
This is the separate-private-key counterpart of AddDetachedSignature2.
Returns True for success, False for failure.
topAddEncryptCert
Adds cert to the internal recipient-certificate list used by EncryptN. Call this method once for each intended recipient. Encryption uses the public key in each certificate, so recipient private keys are not required at encryption time.
Call ClearEncryptCerts to empty the list.
Returns True for success, False for failure.
topAddHeaderField
name: PWideChar;
value: PWideChar): wordbool; stdcall;
Appends a new header field named by name with the value in value. Existing fields having the same case-insensitive name are preserved. An empty value creates a legal empty-valued field.
Chilkat converts spaces in a header name to hyphens, removes embedded CR and LF characters from the value to prevent header injection, and folds long values when serializing.
SetHeaderField to remove all existing occurrences and set one replacement value.Returns True for success, False for failure.
AddPfxSourceBd
bd: HCkBinData;
password: PWideChar): wordbool; stdcall;
Adds the PKCS #12/PFX bytes in bd to the internal collection of credential sources. password is the password protecting the PFX data. Call the method once for each PFX source that should be searched by later decryption or signing operations.
Returns True for success, False for failure.
topAddPfxSourceFile
pfxFilePath: PWideChar;
password: PWideChar): wordbool; stdcall;
Adds the PFX/P12 file at the local filesystem path in pfxFilePath to the internal collection of credential sources. password is the password protecting the file. Call the method once for each PFX source that should be searched.
Returns True for success, False for failure.
topAppendPart
mime: HCkMime): wordbool; stdcall;
Appends a copy of mime as the last direct child. Chilkat does not retain a reference to mime, so later changes to mime do not affect the appended part. The same source object may be appended more than once.
If the current object is not multipart, it is converted to multipart/mixed. The complete original entity, including its existing headers and body, becomes part 0; the copy of mime becomes part 1. The new outer entity contains its generated multipart Content-Type.
PartAt. The object returned by PartAt is a live child, unlike the copied input to this method.Returns True for success, False for failure.
AppendPartFromFile
filename: PWideChar): wordbool; stdcall;
Reads the local file at filename, creates an attachment part, and appends it. Filename-extension matching is case-insensitive.
| File kind | Generated headers |
|---|---|
.txt | text/plain; charset=windows-1252; format=flowed, 7bit, attachment filename and name |
Known binary type, such as .PNG | Inferred media type such as image/png, base64, attachment filename and name |
| Unknown extension | application/octet-stream, base64, attachment filename and name |
If the current object is not multipart, the same conversion described by AppendPart occurs. Calling this method on a new empty object therefore creates an empty part 0 and the file attachment as part 1.
Returns True for success, False for failure.
topAsnBodyToXml
outStr: HCkString): wordbool; stdcall;
function CkMime__asnBodyToXml(objHandle: HCkMime): PWideChar; stdcall;
Parses the current part's decoded body as ASN.1 DER and returns an XML representation of the ASN.1 structure. This is primarily useful for inspecting CMS/PKCS #7 bodies such as application/pkcs7-mime or application/x-pkcs7-mime.
Content-Type: application/pkcs7-mime; smime-type=signed-data Content-Transfer-Encoding: base64 MII...
GetXml.Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
topClearEncryptCerts
Clears the internal recipient-certificate list populated by AddEncryptCert. A subsequent call to EncryptN requires certificates to be added again.
ContainsEncryptedParts
Returns True if the currently visible MIME tree contains a CMS/PKCS #7 encrypted part.
UnwrapSecurity successfully decrypts the enclosing layer.ContainsSignedParts
Returns True if the currently visible MIME tree contains a detached or opaque CMS/PKCS #7 signed part.
UnwrapSecurity. After security layers are unwrapped, this method may return False because the signed wrapper has been removed.Convert8Bit
Recursively converts every part whose Content-Transfer-Encoding is 8bit or binary to base64. Both the child object's Encoding property and the serialized header are updated. Parts using 7bit or another encoding are unchanged.
ConvertToMultipartAlt
Wraps the current entity in a new outer multipart/alternative entity. The original entity becomes the first and initially only child.
The new outer entity retains message-level and custom headers such as MIME-Version, Date, Subject, From, To, Content-ID, Content-Location, and custom fields. The original Content-Type, Content-Transfer-Encoding, Content-Disposition, and body move to the first child. An existing charset parameter is retained on the new multipart Content-Type. Calling the method again wraps the existing multipart in another multipart layer; the operation is not idempotent.
AppendPart. Conventionally, alternatives are ordered from least rich to most rich, such as text/plain followed by text/html.Returns True for success, False for failure.
topConvertToMultipartMixed
Wraps the current entity in a new outer multipart/mixed entity. The original entity becomes the first and initially only child.
The new outer entity retains message-level and custom headers such as MIME-Version, Date, Subject, From, To, Content-ID, Content-Location, and custom fields. The original Content-Type, Content-Transfer-Encoding, Content-Disposition, and body move to the first child. An existing charset parameter is retained on the new multipart Content-Type. Calling the method again wraps the existing multipart in another multipart layer; the operation is not idempotent.
Returns True for success, False for failure.
ConvertToSigned
Creates an opaque (attached) S/MIME signature using cert. The certificate must have access to its private key. On success, the current MIME entity is replaced by CMS/PKCS #7 signed-data containing both the original MIME bytes and the signature.
This differs from AddDetachedSignature, which creates a visible multipart/signed wrapper with a separate signature part.
Returns True for success, False for failure.
ConvertToSignedPk
cert: HCkCert;
privateKey: HCkPrivateKey): wordbool; stdcall;
Creates an opaque (attached) S/MIME signature using cert as the signer certificate and privateKey as its associated private key. Use this method when the certificate and private key are supplied separately.
The resulting CMS/PKCS #7 signed-data contains the original MIME entity and its signature. For a detached multipart/signed result, use AddDetachedSignaturePk.
Returns True for success, False for failure.
Decrypt
Decrypts the current CMS/PKCS #7 encrypted MIME entity and replaces it with the recovered MIME content. Chilkat identifies the intended recipient from the CMS recipient information and searches the configured credential sources for the matching certificate and private key.
| Source | How it is supplied |
|---|---|
| Explicit certificate | AddDecryptCert or DecryptUsingCert |
| PFX/P12 | AddPfxSourceFile, AddPfxSourceBd, or a DecryptUsingPfx... method |
| Certificate vault | UseCertVault |
| Platform certificate store | Windows certificate stores and the macOS Keychain are searched automatically where supported |
Returns True for success, False for failure.
Decrypt2
cert: HCkCert;
privateKey: HCkPrivateKey): wordbool; stdcall;
Decrypts the current CMS/PKCS #7 encrypted MIME entity using the certificate in cert and its associated private key in privateKey. On success, the current object is replaced by the recovered MIME content.
Use this method when the certificate and private key are stored separately. Use Decrypt when Chilkat should locate the credential from configured sources.
Returns True for success, False for failure.
DecryptUsingCert
Decrypts the current CMS/PKCS #7 encrypted MIME entity using cert. The certificate must have access to its corresponding private key. On success, the encrypted wrapper is replaced by the recovered MIME content.
Returns True for success, False for failure.
topDecryptUsingPfxFile
pfxFilePath: PWideChar;
pfxPassword: PWideChar): wordbool; stdcall;
Decrypts the current CMS/PKCS #7 encrypted MIME entity using certificates and private keys from the PFX/P12 file at the local filesystem path in pfxFilePath. pfxPassword is the password protecting the file.
On success, the encrypted wrapper is replaced by the recovered MIME content.
Returns True for success, False for failure.
Encrypt
Encrypts the current MIME entity for the recipient certificate in cert and replaces it with CMS/PKCS #7 encrypted S/MIME. Only the recipient's public key is needed to encrypt; the corresponding private key is required later to decrypt.
The content-encryption algorithm is selected by Pkcs7CryptAlg and Pkcs7KeyLength. For RSA recipients, OaepPadding, OaepHash, and OaepMgfHash control key transport.
Returns True for success, False for failure.
EncryptN
Encrypts the current MIME entity for every certificate previously added with AddEncryptCert. Each recipient receives independently protected access to the same encrypted content.
Add one certificate per intended recipient, call this method, and use ClearEncryptCerts before preparing a different recipient set.
Returns True for success, False for failure.
GetBodyBd
Replaces the contents of binDat with the decoded body bytes of the current part. Existing bytes in binDat are discarded. Base64 and quoted-printable are decoded. MIME headers, multipart boundaries, and child parts are not included.
Returns True for success, False for failure.
GetBodyDecoded
outStr: HCkString): wordbool; stdcall;
function CkMime__getBodyDecoded(objHandle: HCkMime): PWideChar; stdcall;
Returns the decoded body as text. Chilkat first decodes the Content-Transfer-Encoding and then interprets text according to the declared charset.
GetBodyBd or GetBodyBinary for binary payloads.Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
GetBodyEncoded
outStr: HCkString): wordbool; stdcall;
function CkMime__getBodyEncoded(objHandle: HCkMime): PWideChar; stdcall;
Returns the current part's transfer-encoded body text without decoding Base64 or quoted-printable. The returned value is Chilkat's normalized serialization of the body, not necessarily the exact text that appeared in the loaded MIME. For example, Base64 padding and line wrapping or quoted-printable spelling may be regenerated.
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
GetDecryptCertInfo
Examines the current encrypted S/MIME entity and writes information about the required recipient certificate or certificates to the JsonObject in certInfo. This can be used to identify which certificate and private key must be made available before calling Decrypt or UnwrapSecurity.
Returns True for success, False for failure.
GetEntireBody
outStr: HCkString): wordbool; stdcall;
function CkMime__getEntireBody(objHandle: HCkMime): PWideChar; stdcall;
Returns the complete serialized body of the current MIME entity. For multipart MIME, this includes boundary delimiters, each child part's headers and body, and the closing boundary. The current entity's own header fields are not included.
Use GetBodyDecoded when the decoded payload of a single part is needed.
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
GetEntireHead
outStr: HCkString): wordbool; stdcall;
function CkMime__getEntireHead(objHandle: HCkMime): PWideChar; stdcall;
Returns the complete serialized header section of the current MIME entity. The body and any multipart child content are not included.
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
GetHeaderField
fieldName: PWideChar;
outStr: HCkString): wordbool; stdcall;
function CkMime__getHeaderField(objHandle: HCkMime;
fieldName: PWideChar): PWideChar; stdcall;
Returns the value of the first header field whose name matches fieldName case-insensitively. Duplicate later occurrences are not combined. Returns null when no matching field exists.
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
GetHeaderFieldAttribute
name: PWideChar;
attrName: PWideChar;
outStr: HCkString): wordbool; stdcall;
function CkMime__getHeaderFieldAttribute(objHandle: HCkMime;
name: PWideChar;
attrName: PWideChar): PWideChar; stdcall;
Returns an attribute value parsed from the first header field named by name. Both the header name and attrName attribute name are matched case-insensitively. Surrounding quotation marks are removed, and semicolons inside a quoted value are handled as part of the value.
Extended parameters such as filename*=utf-8''r%C3%A9sum%C3%A9.txt are returned in their raw encoded form; this method does not percent-decode or apply the declared charset. Returns null when the field or attribute is absent.
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
GetHeaderFieldName
index: Integer;
outStr: HCkString): wordbool; stdcall;
function CkMime__getHeaderFieldName(objHandle: HCkMime;
index: Integer): PWideChar; stdcall;
Returns the name of the header-field occurrence at zero-based index. Header order and original casing are preserved for ordinary loaded headers. Use NumHeaderFields to determine the valid range.
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
topGetHeaderFieldValue
index: Integer;
outStr: HCkString): wordbool; stdcall;
function CkMime__getHeaderFieldValue(objHandle: HCkMime;
index: Integer): PWideChar; stdcall;
Returns the unfolded value of the header-field occurrence at zero-based index. Continuation lines are combined into a single value. Use NumHeaderFields to determine the valid range.
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
topGetLastJsonData
Copies structured details from the most recent operation into json when such details are available. Many methods do not produce JSON data. Methods involving CMS/PKCS #7 security, such as UnwrapSecurity, may report algorithms, certificates, recipients, signatures, and validation results.
GetMime
outStr: HCkString): wordbool; stdcall;
function CkMime__getMime(objHandle: HCkMime): PWideChar; stdcall;
Serializes and returns the complete MIME entity, including headers, body, multipart boundaries, and all descendants.
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
topGetMimeBd
Serializes the complete MIME entity and appends its bytes to bindat. Existing BinData bytes are preserved. Use this method when arbitrary binary body bytes must not pass through a text string.
Returns True for success, False for failure.
GetMimeSb
Serializes the complete MIME entity and appends it to sb. Existing StringBuilder content is preserved.
Returns True for success, False for failure.
GetSignatureSigningTimeStr
index: Integer;
outStr: HCkString): wordbool; stdcall;
function CkMime__getSignatureSigningTimeStr(objHandle: HCkMime;
index: Integer): PWideChar; stdcall;
Returns the CMS signingTime signed attribute for the signer at zero-based index, formatted as an RFC 822-style date string. For example:
Fri, 21 Nov 1997 09:55:06 -0600
Call HasSignatureSigningTime first because the attribute is optional. Use NumSignerCerts for the signer count.
signingTime value is supplied by the signer. It is different from a timestamp token issued and signed by a trusted timestamp authority.Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
topGetStructure
fmt: PWideChar;
outStr: HCkString): wordbool; stdcall;
function CkMime__getStructure(objHandle: HCkMime;
fmt: PWideChar): PWideChar; stdcall;
Returns a concise MIME-tree summary. fmt is case-insensitive. The value xml selects XML output; all other values, including text, an empty string, or an unrecognized value, select the indented text format.
multipart/mixed
text/plain
application/octet-stream
<multipart-mixed>
<text-plain />
<application-octet-stream />
</multipart-mixed>Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
GetXml
outStr: HCkString): wordbool; stdcall;
function CkMime__getXml(objHandle: HCkMime): PWideChar; stdcall;
Converts the MIME tree to Chilkat's XML representation and returns it as a string. Header names become XML element names, structured header parameters become XML attributes, duplicate headers become repeated elements, multipart children are nested in subpart elements, and binary bodies are represented in an encoded textual form.
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
HasSignatureSigningTime
index: Integer): wordbool; stdcall;
Returns True if the signer at zero-based index has a CMS signingTime signed attribute. Use NumSignerCerts for the signer count and GetSignatureSigningTimeStr to retrieve the value.
IsApplicationData
Returns True when ContentType begins with application/. It returns False for an empty or malformed media type.
IsAttachment
Returns True when the current part's disposition value is attachment, matched case-insensitively. Parameters such as filename do not affect the test. An inline part remains non-attachment even when it has a filename.
IsAudio
Returns True when ContentType begins with audio/.
IsEncrypted
Returns True when the current MIME entity is a CMS/PKCS #7 encrypted S/MIME wrapper. To search the visible MIME tree rather than only the current entity, use ContainsEncryptedParts.
IsHtml
Returns True when ContentType is text/html. The ContentType property must contain only the media type; set parameters such as charset separately.
IsImage
Returns True when ContentType begins with image/, including values such as image/svg+xml.
IsMultipart
Returns True when ContentType begins with multipart/.
IsMultipartAlternative
Returns True when ContentType is multipart/alternative.
IsMultipartMixed
Returns True when ContentType is multipart/mixed.
IsMultipartRelated
Returns True when ContentType is multipart/related.
IsPlainText
Returns True when ContentType is text/plain.
IsSigned
Returns True when the current MIME entity is a CMS/PKCS #7 signed S/MIME wrapper, including detached multipart/signed and opaque signed-data forms. To search the visible MIME tree, use ContainsSignedParts.
IsText
Returns True when ContentType begins with text/.
IsVideo
Returns True when ContentType begins with video/.
IsXml
Returns True only for text/xml or application/xml. It does not classify structured-suffix media types such as application/soap+xml, application/atom+xml, or image/svg+xml as XML.
LastDecryptCert
index: Integer;
cert: HCkCert): wordbool; stdcall;
Loads into cert the decryption certificate at zero-based index from the most recent security-unwrapping operation. Valid indexes range from 0 through NumDecryptCerts - 1.
Returns True for success, False for failure.
topLastSignerCert
index: Integer;
cert: HCkCert): wordbool; stdcall;
Loads into cert the signer certificate at zero-based index from the most recent signature-verification or security-unwrapping operation. Valid indexes range from 0 through NumSignerCerts - 1.
Returns True for success, False for failure.
topLoadMime
mimeMsg: PWideChar): wordbool; stdcall;
Parses the complete MIME text in mimeMsg and replaces the current object's headers, body, and multipart tree. A successful call always replaces the previous MIME.
If no blank line separates headers from the body, lines that appear header-like are parsed as headers and the body is empty. Data after the header/body separator belongs to the body.
Content-Type, repairing a missing multipart closing delimiter during serialization, treating unmatched boundary-like text as an ordinary body, and tolerating malformed Base64 or quoted-printable. LF-only and CR-only input are accepted; generated headers and multipart framing use CRLF. Loading and reserializing is therefore not guaranteed to reproduce the original bytes, and multipart preamble and epilogue text are not retained.LoadMimeBd or LoadMimeBytes for arbitrary 8-bit bytes or embedded NUL bytes.Returns True for success, False for failure.
topLoadMimeBd
Parses complete MIME bytes from bindat and replaces the current MIME on success. This is the preferred loader when the MIME can contain arbitrary 8-bit body bytes or embedded NUL bytes. Parsing tolerance and serialization normalization are the same as LoadMime.
Returns True for success, False for failure.
topLoadMimeFile
fileName: PWideChar): wordbool; stdcall;
Reads and parses the complete MIME entity from the local file at fileName. A successful call replaces the current MIME. If the file cannot be opened, the method returns False and preserves the existing object unchanged.
Parsing tolerance and serialization normalization are the same as LoadMime.
Returns True for success, False for failure.
topLoadMimeSb
Parses complete MIME text from sb and replaces the current MIME on success. Parsing tolerance and serialization normalization are the same as LoadMime.
StringBuilder is text-oriented. Use LoadMimeBd for binary MIME containing arbitrary 8-bit values or NUL bytes.Returns True for success, False for failure.
LoadXml
xml: PWideChar): wordbool; stdcall;
Reconstructs a MIME tree from Chilkat's MIME XML in xml. On success, the current object is replaced. If the XML is invalid, the method returns False and preserves the existing MIME unchanged.
The reconstructed MIME is semantically equivalent but not byte-identical to the MIME that produced the XML. Header names are normalized to lowercase.
Returns True for success, False for failure.
topLoadXmlFile
fileName: PWideChar): wordbool; stdcall;
Reads Chilkat MIME XML from the local file at fileName and reconstructs the MIME tree. On success, the current object is replaced. If the file cannot be opened or the XML is invalid, the method returns False and preserves the existing MIME unchanged. Header names are normalized to lowercase during reconstruction.
Returns True for success, False for failure.
topNewMessageRfc822
mimeObject: HCkMime): wordbool; stdcall;
Clears the current object and initializes it as message/rfc822. Its body is a serialized copy of mimeObject at the time of the call. Later modifications to mimeObject do not change the embedded message.
Returns True for success, False for failure.
topNewMultipartAlternative
Initializes an empty multipart/alternative entity. Clears all existing headers, body content, and child parts. The new object contains only a multipart Content-Type with an automatically generated boundary, has zero parts, and does not automatically add MIME-Version.
Returns True for success, False for failure.
NewMultipartMixed
Initializes an empty multipart/mixed entity. Clears all existing headers, body content, and child parts. The new object contains only a multipart Content-Type with an automatically generated boundary, has zero parts, and does not automatically add MIME-Version.
Returns True for success, False for failure.
NewMultipartRelated
Initializes an empty multipart/related entity. Clears all existing headers, body content, and child parts. The new object contains only a multipart Content-Type with an automatically generated boundary, has zero parts, and does not automatically add MIME-Version.
Returns True for success, False for failure.
PartAt
index: Integer;
subPart: HCkMime): wordbool; stdcall;
Provides live access to the direct child at zero-based index through subPart. Modifying subPart after a successful call modifies the child stored in the parent MIME tree.
Valid indexes range from 0 through NumParts - 1. An invalid index returns False and preserves subPart unchanged.
AppendPart stores a copy of its argument. This method exposes the actual stored child.Returns True for success, False for failure.
topPartsToFiles
path: PWideChar;
st: HCkStringTable): wordbool; stdcall;
Recursively traverses the MIME tree and saves each part having a nonempty filename parameter to the existing directory in path. A name parameter alone is not used as a fallback. The disposition may be attachment or inline; a filename is what controls extraction.
- Only the final path component of a MIME filename is used. Directory components, absolute paths, and
..traversal are discarded. - On Windows, invalid filename characters are replaced with underscores.
- Duplicate filenames target the same path; later parts overwrite earlier parts.
stis appended to rather than cleared. Each added entry is the full path actually written, including any sanitized filename.- The destination directory is not created. If it does not exist, the method returns
False, creates no files, and appends nothing tost.
Returns True for success, False for failure.
topRemoveHeaderField
fieldName: PWideChar;
bAllOccurrences: wordbool) stdcall;
Removes fields whose name matches fieldName case-insensitively. If bAllOccurrences is False, only the first matching occurrence is removed. If bAllOccurrences is True, all matching occurrences are removed. Remaining fields retain their relative order.
RemovePart
index: Integer): wordbool; stdcall;
Removes the direct child at zero-based index. Valid indexes range from 0 through NumParts - 1. An out-of-range index returns False and leaves the tree unchanged.
Returns True for success, False for failure.
topSaveBody
filename: PWideChar): wordbool; stdcall;
Writes the decoded body bytes of the current part to the local path in filename. Base64 and quoted-printable are decoded. MIME headers and multipart framing are not written.
Returns True for success, False for failure.
SaveMime
filename: PWideChar): wordbool; stdcall;
Serializes the complete MIME entity and writes it to the local path in filename, including headers, body, multipart boundaries, and all descendants.
Returns True for success, False for failure.
topSaveXml
filename: PWideChar): wordbool; stdcall;
Writes Chilkat's MIME XML representation to the local path in filename. The file can be loaded by LoadXmlFile.
Returns True for success, False for failure.
topSetBody
str: PWideChar) stdcall;
Sets the current part's body from str while preserving existing content headers such as Content-Type, charset, and Content-Transfer-Encoding.
AppendPart and PartAt.SetBodyBd
Sets the decoded body bytes from bd, changes Content-Transfer-Encoding to base64, and preserves the bytes exactly. It does not set a Content-Type, disposition, filename, or name; set those separately when needed.
Returns True for success, False for failure.
topSetBodyFromEncoded
encoding: PWideChar;
str: PWideChar): wordbool; stdcall;
Sets the body from transfer-encoded text. encoding must be base64 or quoted-printable; other values, including 7bit, 8bit, binary, an unknown name, or an empty string, cause failure.
Base64 whitespace is accepted and the stored representation is normalized. Invalid Base64 causes the method to return False. On any failure, all existing headers and body content are preserved unchanged.
str must already be in the encoding named by encoding. To provide decoded bytes, use SetBodyBd or SetBodyFromBinary.Returns True for success, False for failure.
SetBodyFromFile
fileName: PWideChar): wordbool; stdcall;
Reads the local file at fileName and replaces the current part's body and content headers according to the filename extension.
| File kind | Result |
|---|---|
.txt | text/plain; charset=windows-1252; format=flowed, 7bit |
.html | text/html; charset=windows-1252, 7bit |
| Unknown extension | application/octet-stream, base64, attachment, and filename/name parameters based on the local filename |
If the file cannot be opened, the method returns False and preserves the existing MIME unchanged.
Returns True for success, False for failure.
SetBodyFromHtml
str: PWideChar): wordbool; stdcall;
Sets str as HTML and changes the media type to text/html. For ASCII input, Chilkat uses Content-Transfer-Encoding: 7bit and does not add a charset. Existing unrelated headers are preserved.
Returns True for success, False for failure.
SetBodyFromPlainText
str: PWideChar): wordbool; stdcall;
Sets str as plain text. For ASCII input, Chilkat sets Content-Type: text/plain; format=flowed and Content-Transfer-Encoding: 7bit without a charset. For non-ASCII UTF-8 input, it sets charset=utf-8 and uses 8bit. Existing unrelated headers are preserved.
Returns True for success, False for failure.
SetBodyFromXml
str: PWideChar): wordbool; stdcall;
Sets str as XML, changes the media type to text/xml, and selects a transfer encoding appropriate for the text. For ASCII input, Chilkat uses 7bit and does not add a charset.
The XML declaration's encoding value is not copied to the MIME charset parameter.
LoadXml reconstructs an entire MIME object from Chilkat MIME XML.Returns True for success, False for failure.
SetHeaderField
name: PWideChar;
value: PWideChar): wordbool; stdcall;
Sets one header field named by name. Matching is case-insensitive. All existing occurrences are removed and one replacement is inserted. If no field exists, a new one is added. Passing an empty value removes all matching occurrences rather than creating an empty-valued field.
Use AddHeaderField to append another occurrence or to create an empty-valued field.
Returns True for success, False for failure.
SetVerifyCert
Sets cert as an explicitly supplied signer certificate for subsequent signature verification. This is useful when the CMS/PKCS #7 signature does not embed the signer certificate or when the application must require a particular certificate.
The certificate's public key is used for verification; a private key is not required.
Returns True for success, False for failure.
topUnwrapSecurity
Recursively removes all visible S/MIME security layers from the MIME tree. It decrypts encrypted parts and verifies detached or opaque signatures, continuing through nested layers until no additional supported security wrapper remains.
On success, the object contains the original MIME structure and content from before signing and encryption. The method returns True only when every required decryption and signature verification succeeds.
| After the call | Use |
|---|---|
NumSignerCerts and LastSignerCert | Inspect the certificates associated with verified signatures. |
NumDecryptCerts and LastDecryptCert | Inspect certificates associated with decryption. |
GetLastJsonData | Inspect algorithms and other operation details. |
Returns True for success, False for failure.
UrlEncodeBody
charset: PWideChar) stdcall;
Replaces the current body with an application/x-www-form-urlencoded-style representation using the character set named by charset. Spaces become +, a literal plus becomes %2B, non-ASCII bytes become %HH sequences, and separators such as & and = remain unchanged.
Input: a b+c&d=e Output: a+b%2Bc&d=e
The MIME content headers are not changed. If the named character set is unsupported, the body remains unchanged.
base64 and quoted-printable.UseCertVault
Sets vault as the certificate vault used to locate certificates and private keys for S/MIME encryption, decryption, signing, and verification. Only one vault is active; each call replaces the previously configured vault.
Use XmlCertVault when credentials are maintained independently of platform certificate stores or individual PFX sources.
Returns True for success, False for failure.
topVerify
Verifies the current CMS/PKCS #7 signed MIME entity and removes the signature wrapper. Both detached multipart/signed messages and opaque CMS signed-data are supported. On success, the object is restored to the MIME structure and content that was signed.
The signer certificate is commonly embedded in the signature. If it is absent, Chilkat searches configured or platform certificate sources, or uses a certificate supplied by SetVerifyCert.
Returns True for success, False for failure.
Deprecated
NumEncryptCerts
Deprecated. Use NumDecryptCerts instead.
Returns the number of decryption certificates recorded by the most recent S/MIME security-unwrapping operation. The property is populated by UnwrapSecurity.
AddPfxSourceData Deprecated
pfxFileData: HCkByteData;
pfxPassword: PWideChar): wordbool; stdcall;
Legacy byte-array method. Adds the PKCS #12/PFX data in pfxFileData to the internal collection of credential sources. pfxPassword is the password protecting the PFX. Call the method once for each PFX source that should be searched.
Prefer AddPfxSourceBd when a BinData object is available.
Returns True for success, False for failure.
topDecryptUsingPfxData Deprecated
pfxData: HCkByteData;
password: PWideChar): wordbool; stdcall;
Legacy byte-array method. Decrypts the current CMS/PKCS #7 encrypted MIME entity using certificates and private keys from the PFX/P12 bytes in pfxData. password is the password protecting the PFX data.
On success, the encrypted wrapper is replaced by the recovered MIME content.
Returns True for success, False for failure.
topExtractPartsToFiles
dirPath: PWideChar): HCkStringArray; stdcall;
Deprecated. Applications should call PartsToFiles.
This method recursively saves parts having a nonempty filename parameter to the existing directory in dirPath and returns a StringArray containing the created paths. See PartsToFiles for the current extraction and filename-handling rules.
Returns nil on failure
FindIssuer
Deprecated. Use the certificate object's GetIssuer method instead.
Finds the issuer of cert. If cert is self-issued or a root certificate, the returned object is a copy of cert.
Returns nil on failure
GetBodyBinary Deprecated
Returns the decoded body bytes of the current part. Base64 and quoted-printable are decoded, but no MIME headers or multipart framing are included. This legacy byte-array method preserves arbitrary bytes, including embedded NUL bytes.
Returns True for success, False for failure.
topGetEncryptCert
Deprecated. Use LastDecryptCert instead.
Returns the certificate at zero-based index from the certificates recorded by the most recent decryption operation. Use NumDecryptCerts for the count.
Returns nil on failure
GetMimeBytes Deprecated
Returns the complete serialized MIME entity as a byte array. This preserves binary body bytes that cannot safely pass through a string.
Returns True for success, False for failure.
topGetPart
index: Integer): HCkMime; stdcall;
This method is deprecated. Applications should call PartAt.
Retrieves the direct child at zero-based index. The returned object provides live access to the child stored in the parent MIME tree, so modifying it modifies the parent.
Returns nil on failure
GetSignerCert
Deprecated. Use LastSignerCert instead.
Returns the signer certificate at zero-based index from the most recent verification or security-unwrapping operation.
Returns nil on failure
GetSignerCertChain
Deprecated. Retrieve the signer certificate with LastSignerCert and then obtain its certificate chain through the Cert API.
This method returns the chain associated with the signer at zero-based index.
Returns nil on failure
LastJsonData
Deprecated. Use GetLastJsonData instead.
Returns a JsonObject containing details produced by the most recent operation when that operation provides structured diagnostic data. For example, after UnwrapSecurity, the JSON may describe the signature, key-transport, content-encryption, and certificate information encountered.
Returns nil on failure
LoadMimeBytes Deprecated
Parses complete MIME bytes from binData and replaces the current MIME on success. This byte-oriented loader preserves arbitrary 8-bit values and embedded NUL bytes. Parsing tolerance and serialization normalization are the same as LoadMime.
Returns True for success, False for failure.
topSetBodyFromBinary Deprecated
Legacy byte-array method. Sets the decoded body bytes from binData, changes Content-Transfer-Encoding to base64, and preserves the bytes exactly. It does not set a Content-Type, disposition, filename, or name; set those separately when needed. Prefer SetBodyBd when using BinData.
Returns True for success, False for failure.
top