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

 

 

 

 

 

 

 

Multipart/Related HTML Related Items

Download Chilkat Email ActiveX

This article discusses related items found in HTML email.

' Related items are the embedded graphics, style sheets, etc. that are
' often included in HTML email.  These are not considered to be "attachments".
' HTML emails that include related items (i.e. embedded images or sytle sheets)
' are formatted as a multipart/related MIME message.  Chilkat makes
' it easy to access the related items, filenames, data, etc. or to save
' the related items to disk files.
' This example demonstrates most of the functionality...
Private Sub SaveRelatedItems(email As ChilkatEmail2)

    Dim filename As String
    Dim relatedData As Variant
    Dim relatedString As String
    
    n = email.NumRelatedItems
    For i = 0 To n - 1
        filename = email.GetRelatedFilename(i)
        MsgBox "Related item " & Str(i) & " filename = " & filename
        
        ' Save the related item to the "relatedItemsDir" sub-directory
        email.SaveRelatedItem i, "relatedItemsDir"
       
        ' You can access the contents of the related item by calling
        ' GetRelatedData.  If (for example) the related item was a GIF file,
        ' the relatedData Variant would contain the binary GIF image data.
        relatedData = email.GetRelatedData(i)
        
        ' You can also access the contents of a related item as a string.
        ' (This would make sense for sytle sheets)
        ' The charset passed in the 2nd argument indicates the character encoding
        ' of the characters within the text.  Because VB6 strings are Unicode,
        ' the component is (implicitly) converting from that charset to Unicode.
        relatedString = email.GetRelatedString(i, "utf-8")
    Next
    
End Sub


 

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