Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
|
Unpack HTML Email to FilesUnpacks 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.
LOCAL loEmail LOCAL lnSuccess LOCAL lcUnpackDir LOCAL lcPartsSubdir LOCAL lcHtmlFilename loEmail = CreateObject('Chilkat.Email2') lnSuccess = loEmail.LoadEml("bonaire.eml") IF (lnSuccess <> 1) THEN =MESSAGEBOX(loEmail.LastErrorText) QUIT ENDIF * Is this an HTML email? IF (loEmail.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. lcUnpackDir = "c:/temp" lcPartsSubdir = "images" lcHtmlFilename = "thisEmail.html" lnSuccess = loEmail.UnpackHtml(lcUnpackDir,lcHtmlFilename,lcPartsSubdir) IF (lnSuccess <> 1) THEN =MESSAGEBOX(loEmail.LastErrorText) ENDIF * 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 ENDIF |
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.
Mail Component · .NET Email Component · ASP Mail Component · XML Parser