ASP Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

ASP Examples

ASP String
ASP Byte Array
Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar
ASP Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

 

 

 

 

 

 

Unpack HTML Email to Files

Unpacks an HTML email into an HTML file and related files (images and style sheets). The links within the HTML are updated to point to the files unpacked and saved to disk.

Download Chilkat Email ActiveX

Download 32-bit Chilkat IMAP ActiveX (.msi)

Download All 32-bit Chilkat ActiveX Components (.zip)

Download All 64-bit Chilkat ActiveX Components (.zip)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%

set email = Server.CreateObject("Chilkat.Email2")

success = email.LoadEml("bonaire.eml")
If (success <> 1) Then
    Response.Write "<pre>" & Server.HTMLEncode(email.LastErrorText) & "</pre>"

End If

'  Is this an HTML email?
If (email.HasHtmlBody() = 1) Then

    '  Unpack the HTML to files.  The image and css URLs
    '  in the HTML are modified to point to the files extracted to disk.
    unpackDir = "c:/temp"
    partsSubdir = "images"
    htmlFilename = "thisEmail.html"
    success = email.UnpackHtml(unpackDir,htmlFilename,partsSubdir)
    If (success <> 1) Then
        Response.Write "<pre>" & Server.HTMLEncode(email.LastErrorText) & "</pre>"
    End If

    '  If the UnpackHtml method was successful, the
    '  HTML is written to c:/temp/thisEmail.html and
    '  the image files are located in c:/temp/images

End If


%>
</body>
</html>

 

© 2000-2012 Chilkat Software, Inc. All Rights Reserved.