Visual Basic Examples

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

VB Examples

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

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


VB Strings
VB Byte Array

 

 

 

 

 

 

 

Unpack HTML Email to Files

Download Chilkat Email ActiveX

This example demonstrates how to use Chilkat Email + Chilkat MHT to unpack an HTML email to HTML files where the image and style sheet URLs within the HTML are updated to reference the image and style sheet files that are created.

    ' Unpack HTML email to an HTML file.  All embedded images
    ' and style sheets are written to files in a sub-directory.  The links
    ' within the HTML are updated to reference the extracted files.
    
    ' First, unlock the components that are needed.  This example
    ' requires a license to both the email and MHT components.
    Dim mailman As New ChilkatMailMan2
    mailman.UnlockComponent "Anything for 30-day trial"
    
    Dim mht As New ChilkatMHT
    mht.UnlockComponent "Anything for 30-day trial"
    
    ' Load an HTML email from a .eml file.
    Dim email As New ChilkatEmail2
    email.LoadEml "htmlEmail.eml"
    
    ' Unpack the email to "unpackDir/myEmail.html".   Images and style sheets
    ' are written to the "unpackDir/images" subdirectory.  All directories
    ' are automatically created if not already existing.
    mht.UnpackMhtStr email.GetMime(), "unpackDir", "myEmail.html", "images"

 

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