Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component

  

  

  Chilkat ActiveX Components

  Chilkat .NET Components

  Chilkat C++ Libraries

  

  

  

  

 

FAQ

S/MIME component for MIME Internet Messages

Chilkat Online Reference Documentation


S/MIME Component Reference

MimeFactory

The MimeFactory is an insertable object, meaning that it can be inserted onto a form at design time within such IDEs as Visual Basic or Delphi. The sole purpose of this object is to create a ChilkatMime object, and there is only one method - NewMime:

NewMime As ChilkatMime
Creates a new ChilkatMime object.

ChilkatMime

The ChilkatMime object represents a single MIME message. If it is multipart, it will contain another ChilkatMime object for each of its sub-parts.

    Properties
              
    Methods

ChilkatMime Properties
(BACK)

Boundary As String read/write
The boundary string to be used if this is a multipart message. By default, the boundary is automatically generated to be a unique and random string, so explicitly setting the boundary is not necessary.
Charset As String read/write
The charset, such as "ISO-8859-1".
ContentType As String read/write
The MIME content type, such as "text/plain", "text/html", "multipart/alternative", "multipart/mixed", etc.
Disposition As String read/write
The content disposition, which can be "attachment", "inline", etc.
Encoding As String read/write
A content encoding such as "base64", "quoted-printable", "7bit", "8bit", etc.
Filename As String read/write
The filename when the content disposition is "attachment".
Micalg As String read/write
The MIC algorithm, such as "SHA1" when the content type is multipart/signed. Properties such as this are rarely set manually, as Chilkat MIME automatically sets it to the correct value when creating a signed message.
NumEncryptCerts As Long as read-only
The number of encryption certificates collected when unwrapping this S/MIME message.
NumParts As Long as read-only
The number of sub-parts contained within this message. Each sub-part is a complete Chilkat MIME message itself.
NumSignerCerts As Long as read-only
The number of signing certificates collected when unwrapping this S/MIME message.
Protocol As String as read/write
A protocol such as "application/x-pkcs7-signature". Properties such as this are rarely set manually, as Chilkat MIME automatically sets it to the correct value when creating a signed message.
UnwrapExtras As Long as read/write
Controls whether extra (informative) header fields are added to the MIME message when unwrapping security.
Version As String as read-only
The version, such as "1.0.0".

ChilkatMime Methods
(BACK)

AddDetachedSignature(cert As ChilkatCert)
Signs the message using the certificate provided. (Chilkat Certificate must be downloaded and installed separately.) If successful, the message is converted to "multipart/signed" and the original message will be contained in the first sub-part.
AppendPart(message As ChilkatMime)
Appends a ChilkatMime message to the sub-parts of this message. Arbitrarily complex messages with unlimited nesting levels can be created. If the calling ChilkatMime object is not already multipart, it is automatically converted to multipart/mixed first.
AppendPartFromFile(filename As String)
Loads a file and creates a ChilkatMime message using the file extension to determine the content type, and adds it as a sub-part to the calling object.
ConvertToSigned(cert As ChilkatCert)
Digitally signs the calling ChilkatMime object, but rather than the signature becoming a sub-part of the message (as in AddDetachedSignature) it becomes part of the message. In S/MIME terms, the message becomes application/x-pkcs7-mime rather than multipart/signed.
Encrypt(cert As ChilkatCert)
Encrypts the message using the specified certificate.
GetBodyBinary() As Variant
Returns the body of the MIME message as a block of binary data. The body is automatically converted from its encoding type, such as base64 or quoted-printable, before being returned.
GetBodyDecoded() As String
Returns the body of the MIME message as a String. The body is automatically converted from its encoding type, such as base64 or quoted-printable, before being returned.
GetBodyEncoded() As String
Returns the body of the MIME message as a String. The body is explicitly not decoded from it's encoding type, so if it was represented in Base64, you will get the Base64 encoded body, as an example.
GetEncryptCert(index As Long) As ChilkatCert
Returns the Nth certificate used for encryption. Most likely the message was only encrypted once, and if so, the index should be set to 0.
GetHeaderField(fieldName As String) As String
Returns the content of a header field. The "fieldName" is case-insensitive, and if the field does not exist, an empty string is returned.
GetMime() As String
Returns a string containing the complete MIME message, including all sub-parts.
GetPart(index As Long) As ChilkatMime
Returns the Nth sub-part of the message. Indexing begins at 0.
GetSignerCert(index As Long) As ChilkatCert
Returns the Nth certificate used to sign the message. Indexing begins at 0.
GetXml() As String
Returns the MIME message converted to XML.
IsApplicationData() As Long
Return true (1) if the MIME message contains application data, otherwise returns false (0).
IsAttachment() As Long
Return true (1) if this MIME message is an attachment, otherwise returns false (0).
IsAudio() As Long
Return true (1) if the MIME message contains audio data, otherwise returns false (0).
IsEncrypted() As Long
Return true (1) if the MIME message is encrypted, otherwise returns false (0).
IsHtml() As Long
Return true (1) if the body is HTML, otherwise returns false (0).
IsImage() As Long
Return true (1) if the MIME message contains image data, otherwise returns false (0).
IsMultipart() As Long
Return true (1) if the MIME message is multipart in any way, otherwise returns false (0).
IsMultipartAlternative() As Long
Return true (1) if the MIME message is multipart/alternative, otherwise returns false (0).
IsMultipartMixed() As Long
Return true (1) if the MIME message is multipart/mixed, otherwise returns false (0).
IsMultipartRelated() As Long
Return true (1) if the MIME message is multipart/related, otherwise returns false (0).
IsPlainText() As Long
Return true (1) if the body is plain text, otherwise returns false (0).
IsSigned() As Long
Return true (1) if the MIME message is digitally signed, otherwise returns false (0).
IsText() As Long
Return true (1) if the body is any kind of text format, such as HTML, XML, etc., otherwise returns false (0).
IsVideo() As Long
Return true (1) if the MIME message contains video data, otherwise returns false (0).
IsXml() As Long
Return true (1) if the body is XML, otherwise returns false (0).
LoadMime(mimeText As String)
Discards the current contents and loads a new MIME message from a string.
LoadMimeFile(filename As String) As Long
Same as LoadMime, but gets the MIME message from a file. Returns 1 for success and 0 for failure.
LoadXml(xmlText As String)
Discards the current contents and loads a new MIME message from an XML string.
LoadXmlFile(filename As String) As Long
Same as LoadXml, but gets the XML data from a file. Returns 1 for success and 0 for failure.
NewMultipartAlternative()
Discards the current contents, if any, an initializes the ChilkatMime object to be an empty mulipart/alternative message.
NewMultipartMixed()
Discards the current contents, if any, an initializes the ChilkatMime object to be an empty mulipart/mixed message.
NewMultipartRelated()
Discards the current contents, if any, an initializes the ChilkatMime object to be an empty mulipart/related message.
SetAlgorithmRC2()
No longer used, use SetCSP instead.
SetAlgorithmRC4()
No longer used, use SetCSP instead.
SetAlgorithmDES()
No longer used, use SetCSP instead.
SetAlgorithm3DES()
No longer used, use SetCSP instead.
SetCSP(csp As ChilkatCSP)
Sets the encryption and digital signature preferences for this message. The ChilkatCSP object will control the Cryptographic Service Provider used, the key container within the CSP to be used, and the encryption/hash algorithms.
SaveBody(filename As String)
Saves the message body to a file. If the body is base64 or quoted-printable encoded, it is automatically decoded.
SaveMime(filename As String)
Saves the MIME message to a file, in MIME format.
SaveXml(filename As String)
Saves the MIME message to a file, converted to XML format.
SetBodyFromEncoded(encoding As String, messageBody As String)
Sets the message body from a Base64 or Quoted-Printable encoded string.
SetBodyFromFile(filename As String)
Sets the message body from the contents of a file.
SetBodyFromHtml(messageBody As String)
Sets the message body from a string containing HTML, and also updates the content-type.
SetBodyFromPlainText(messageBody As String)
Sets the message body from a string containing plain text, and also updates the content-type.
SetBodyFromXml(messageBody As String)
Sets the message body from a string containing XML, and also updates the content-type.
SetHeaderField(fieldName As String, value As String)
Adds or replaces a header field. If the field already exists, it is automatically replaced. Otherwise it is added.
UnlockComponent(unlockCode As String)
Unlocks the component. This must be called after instantiating the object.
UnwrapSecurity() As Long (This method verifies and decrypts S/MIME messages)
Decrypts and verifies all digital signatures contained within the email, and returns true (1) if all decryptions and verifications succeeded. Otherwise returns false. After unwrapping, the information regarding security and certificates can be obtained by the methods GetSignerCert and GetEncryptCert, and the properties NumEncryptCerts and NumSignerCerts.

 

 

 

 

 

 

 

About Chilkat


Privacy Statement. Copyright 2000-2008 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, and Windows 95/98/NT4.

Downloads
.NET 2.0
.NET 1.*
.NET x64
VC++ 6.0
VC++ 7.0
VC++ 8.0
Java
Ruby
Perl 5.8.*
Perl 5.10.*
Python
Bounce ActiveX
Charset ActiveX
Email ActiveX
FTP2 ActiveX
Crypt ActiveX
HTML-to-XML ActiveX
HTTP ActiveX
IMAP ActiveX
MHT ActiveX
MIME ActiveX
RSA ActiveX
Socket ActiveX
Spider ActiveX (free)
String ActiveX (free)
Tar ActiveX
Upload ActiveX (free)
XML ActiveX (free)
XMP ActiveX
Zip ActiveX