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
Create HTML Email from an HTML File with a Form (for a Survey)
This example creates an HTML email from an HTML file containing a form with a survey. Theoretically, the form would have a target URL setup to receive the survey submission. Import the MHT ActiveX into Delphi so you have the MHT icon in the ActiveX palette. Drop the MHT icon onto the unit form. (Do the same for the Chilkat Mail ActiveX.) procedure TForm1.Button1Click(Sender: TObject); var iEmail : IChilkatEmail2; begin ChilkatMHT1.UnlockComponent('UnlockCode'); ChilkatMailMan1.UnlockComponent('UnlockCode'); // Create an HTML email from an HTML file. iEmail := ChilkatMHT1.GetEmail('survey.html') as CHILKATMAILLib2_TLB.IChilkatEmail2; // Address it and give it a subject. iEmail.AddTo('Chilkat Support','support@chilkatsoft.com'); iEmail.From := 'Matt <matt@chilkatsoft.com>'; iEmail.Subject := 'Survey'; // Set our SMTP server and send the email. ChilkatMailMan1.SmtpHost := 'smtp.earthlink.net'; ChilkatMailMan1.SendEmail(iEmail); end;
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.