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
Convert HTML File to Email and Send
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
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.