Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python 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
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.