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