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

HTML Email Conversion

Chilkat Online Reference Documentation


Reference

MHT Properties

BaseUrl As String read/write
When a local HTML file is converted to EML or MHT, this defines the base URL to be used when converting relative HREFs found in the HTML to absolute HREFs.[top]
DebugHtmlBefore As String read/write
A filename to save the input HTML when converting a URL, file, or HTML string to EML or MHT. [top]
DebugHtmlAfter As String read/write
A filename to save the result HTML when converting a URL, file, or HTML string to EML or MHT. If problems are experienced, the before/after HTML can be analyzed to help determine the source of a problem. [top]
DebugTagCleaning As Long read/write
When set to 1, causes Chilkat MHT to be much more verbose in logging information when converting HTML to MHT. The default value is 0. [top]
ErrorLogHtml As String read-only
Returns detailed error information. if any, for the last method call. The error information is formatted as HTML with <br> tags separating lines. [top]
ErrorLogText As String read-only
Returns detailed error information. if any, for the last method call. The error information is formatted as us-ascii text with CRLF line endings. [top]
ErrorLogXml As String read-only
Returns detailed error information. if any, for the last method call. The error information is formatted as XML. [top]
NoScripts As Long read/write
This only applies when creating MHT files. Scripts are always removed when creating EML or emails from HTML. If set to 1, then all scripts are removed, if set to 0 (the default) then scripts are not removed.[top]
PreferMhtScripts As Long read/write
(The default value of this property is almost always OK.)
Only applicable when getting MHT. If equal to 1 ( the default) then all scripts in the page are preserved and external scripts are downloaded and stored in the MHT. If set to 0, AND the HTML contains <noscript> tags indicating that it supports a non-scripting version, then the scripts are removed and the <noscript> tags are also removed to expose what is contained between <noscript> and </noscript> pairs.[top]
Proxy As String read/write
(Optional) A proxy name if a proxy is necessary to access the Internet. This is not needed if Internet Explorer is setup with a proxy. Chilkat MHT will automatically use the IE proxy configuration if one is found.[top]
Version As String read-only
The version of the component, such as "1.0.0"[top]
WebSiteLogin As String read-write
(Optional) Specifies the login if a method is used with a Web page that requires a login. [top]
WebSitePassword As String read-write
(Optional) Specifies the password if a method is used with a Web page that requires a login. [top]

 

MHT Methods

AddExternalStyleSheet( url_or_filename As String )
(This method rarely needs to be called.)
Includes an additional style sheet that wouldn't normally be included with the HTML. This method is provided for cases when style sheet names are constructed and dynamically included in Javascript such that Chilkat MHT cannot know beforehand what stylesheet to embed. Chilkat MHT by default downloads and embeds all stylesheets externally referenced by the HTML.[top]
ExcludeImagesMatching( pattern As String )
(This method rarely needs to be called.)
Tells Chilkat MHT to not embed any images whose URL matches a pattern. Sometimes images can be referenced within style sheets and not actually used when rendering the page. In cases like those, the image will appear as an attachment in the HTML email. This feature allows you to explicitly remove those images from the email so no attachments appear.[top]
GetAndSaveEML( url_or_filename As String, filename As String ) As Long
Creates an EML file from a Web page. All external images and style sheets are downloaded and embedded in the EML file. Returns 1 for success and 0 for failure.[top]
GetAndSaveMHT( url_or_filename As String, filename As String ) As Long
Creates an MHT file from a Web page. All external images, scripts, and style sheets are downloaded and embedded in the MHT file. Returns 1 for success and 0 for failure.[top]
GetAndZipEML( url_or_filename As String, zipEntryFilename As String, zipFilename) As Long
Creates an EML file from a Web page, compresses, and appends to a new or existing Zip file. All external images and style sheets are downloaded and embedded in the EML file. Returns 1 for success and 0 for failure.
[top]
GetAndZipMHT( url_or_filename As String, zipEntryFilename As String, zipFilename) As Long
Creates an MHT file from a Web page, compresses, and appends to a new or existing Zip file. All external images and style sheets are downloaded and embedded in the MHT file. Returns 1 for success and 0 for failure.
[top]
GetEmail( url_or_filename As String ) As ChilkatEmail
Downloads a Web page and creates a ChilkatEmail object that can be sent using Chilkat Mail. Embedded within the email are all the images and style sheets referenced from the Web page. [top]
GetEML( url_or_filename As String ) As String
Creates EML from a Web page, and returns the EML (MIME) message data.[top]
GetMHT( url_or_filename As String ) As String
Creates MHT from a Web page, and returns the MHT (MIME) message data.[top]
GetMime( url_or_filename As String ) As ChilkatMime
Downloads a Web page and creates a Chilkat Mime object that can be manipulated using the Chilkat S/MIME component. This is the same as calling GetEML and then loading the MIME object with the EML message. Chilkat S/MIME must be installed and unlocked for this to work.[top]
GetWebEmail( url_or_filename As String ) As WebEmail
Downloads a Web page and creates a WebEmail object that can be sent using Chilkat WebMail. Embedded within the email are all the images and style sheets referenced from the Web page. [top]
HtmlToEmail( htmlText As String ) As ChilkatEmail
Creates a ChilkatEmail object from in-memory HTML. Embedded within the email are all the images and style sheets referenced from the Web page. [top]
HtmlToEML( htmlText As String, filename As String ) As Long
Creates an EML file from in-memory HTML. All external images and style sheets are downloaded and embedded in the EML file. Returns 1 for success and 0 for failure.[top]
HtmlToMHT( htmlText As String, filename As String ) As Long
Creates an MHT file from in-memory HTML. All external images, scripts, and style sheets are downloaded and embedded in the MHT file. Returns 1 for success and 0 for failure.[top]
HtmlToWebEmail( htmlText As String ) As WebEmail
Creates a WebEmail object from in-memory HTML. Embedded within the email are all the images and style sheets referenced from the Web page. [top]
RestoreDefaults( )
Removes any extra style sheets added by AddExternalStyleSheet, or any image exclusions set by ExcludeImagesMatching.[top]
SaveXmlLog( filename As String )
Saves the XML error log to a file. [top]
UnlockComponent( unlockCode As String )
Unlocks the component. [top]
UnpackMHT( MhtFilename As String, UnpackDirectory As String, HtmlFilename As String, PartsSubDir As String )
Unpacks the contents of a MHT file. The destination directory is specified by UnpackDirectory. The name of the HTML file created is specified by HtmlFilename, and supporting files (images, javascripts, etc.) are created in PartsSubDir, which is automatically created if it does not already exist. Here is an example:

UnpackMHT "cnn.mht", "C:\html_files", "cnn.html", "cnn_files"

This call would create the "C:\html_files\cnn_files" directory if it did not already exist.
. [top]

Properties

BaseUrl
DebugHtmlBefore
DebugHtmlAfter
DebugTagCleaning
ErrorLogHtml
ErrorLogText
ErrorLogXml
NoScripts
PreferMHTScripts
Proxy
Version
WebSiteLogin
WebSitePassword

Methods

AddExternalStyleSheet
ExcludeImagesMatching

GetAndSaveEML
GetAndSaveMHT
GetAndZipEML
GetAndZipMHT

GetEmail

GetEML

GetMHT
GetMime
GetWebEmail

HtmlToEmail
HtmlToEML
HtmlToMHT
HtmlToWebMail
RestoreDefaults
SaveXmlLog
UnlockComponent

UnpackMHT

 


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