.NET Components
Chilkat .NET Components for Email, Zip Compression, Encryption, XML, S/MIME, and Character Encoding Conversion

BACK

Chilkat::Mht Class

Chilkat MHT can generate email objects from HTML files and URLs, and convert HTML to MHT or EML files.

Base Classes: Object
  Properties Description  
    BaseUrl When processing an HTML file or string (not a website URL), this defines the base URL to be used when converting relative HREFs to absolute HREFs.

 
    DebugHtmlAfter A filename to save the result HTML when converting a URL, file, or HTML string. If problems are experienced, the before/after HTML can be analyzed to help determine the cause.

 
    DebugHtmlBefore A filename to save the input HTML when converting a URL, file, or HTML string. If problems are experienced, the before/after HTML can be analyzed to help determine the cause.

 
    DebugTagCleaning When true causes the Mht class to be much more verbose in its logging. The default is false.

 
    LastError An XML-formatted string containing error information, if any, of the last method call.

 
    NoScripts Only applies when creating MHT files. Scripts are always removed when creating EML or emails from HTML. If set to true, then all scripts are removed, if set to false (the default) then scripts are not removed.

 
    PreferMHTScripts Only applicable when getting MHT. If true ( the default) then all scripts in the page are preserved and external scripts are downloaded and stored in the MHT. If false AND the HTML contains  
    Proxy (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. The Mht class will automatically use the IE proxy configuration if one is found

 
    Version The version of the component, such as "1.0.0"

 
    WebSiteLogin (Optional) Specifies the login if a a Web page is accessed that requires a login

 
    WebSitePassword Optional) Specifies the password if a a Web page is accessed that requires a login and password

 
  Methods Description  
    AddExternalStyleSheet (This method rarely needs to be called.) Includes an additional style sheet that would not 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 MHT .NET cannot know beforehand what stylesheet to embed. MHT .NET by default downloads and embeds all stylesheets externally referenced by the HTML

 
    ExcludeImagesMatching (This method rarely needs to be called.) Tells Chilkat MHT .NET 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.

 
    GetAndSaveEML Creates an EML file from a Web page. All external images and style sheets are downloaded and embedded in the EML file. Returns true for success and false for failure.

 
    GetAndSaveMHT Creates an MHT file from a Web page or local HTML file. All external images, scripts, and style sheets are downloaded and embedded in the MHT file. Returns true for success and false for failure.

 
    GetAndZipEML 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. Returns true for success and false for failure.

 
    GetAndZipMHT 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. Returns true for success and false for failure.

 
    GetEmail Downloads a Web page and creates an HTML Email object that can be sent using Chilkat Email .NET. Embedded within the email are all the images and style sheets referenced from the Web page.

 
    GetEML Creates EML from a Web page or HTML file, and returns the EML (MIME) message data as a string

 
    GetMHT Creates MHT from a Web page or local HTML file, and returns the MHT (MIME) message data as a string

 
    GetMime Converts a Web Page (URL) or HTML file to a Chilkat.Mime object.

 
    HtmlToEML Creates an EML file from an in-memory HTML string. All external images and style sheets are downloaded and embedded in the EML file. Returns true for success and false for failure

 
    HtmlToMHT Creates an MHT Web Archive from an in-memory HTML string. All external images and style sheets are downloaded and embedded in the MHT file. Returns true for success and false for failure

 
    IsUnlocked Returns true if the MHT component is unlocked.

 
    RestoreDefaults Restores the default property settings.

 
    SaveLastError Saves the error log to an XML log file

 
    UnlockComponent Unlocks the component allowing for the full functionality to be used. Returns true if the unlock code is valid.

 
    UnpackMHT 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.

 

Copyright 2002, Chilkat Software, Inc. All Rights Reserved.