Visual Basic Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



VB Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
String
Tar
Unicode
Upload
XML
XMP
Zip Compression

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor


VB Strings
VB Byte Array

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

 

Convert HTML File to Email and Send

Download Visual Basic Project Files and Source Code

This example converts an HTML file with images into a self-contained email and sends it.

' This example requires the purchase of 2 Chilkat components:
' Chilkat MHT and Chilkat Mail.
Private Sub Command1_Click()
    
    ' Create the Chilkat MHT component instance
    Dim mht As New ChilkatMHT
    mht.UnlockComponent "MHT_Unlock_Code"
    
    ' Create the Chilkat MailMan component instance
    Dim mailman As New ChilkatMailMan2
    mailman.UnlockComponent "Mail_Unlock_Code"
    
    ' Convert an HTML file to an email object.
    Dim email As ChilkatEmail2
    Set email = mht.GetEmail("example.html")
    
    mailman.SmtpHost = "smtp.earthlink.net"
    
    ' Address and send...
    email.AddTo "Chilkat Webmaster", "admin@chilkatsoft.com"
    email.From = "Chilkat Support <support@chilkatsoft.com>"
    email.Subject = "This is an HTML email"
 
    mailman.SendEmail email
    
End Sub

 

Need a specific example? Send a request to support@chilkatsoft.com

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