Delphi Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Delphi 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
Upload
XML
XMP
Zip Compression

More Examples...
Byte Array
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
SSH Key
SSH
SSH Tunnel
SFTP

Unreleased...
Bzip2
LZW
Bz2
Icon

Type Conversion

 

Article: Understanding COM References in Delphi

Create HTML Email from an HTML File with a Form (for a Survey)

Download Chilkat MHT ActiveX

Download Chilkat Email ActiveX

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.

Mail Component · .NET Email Component · XML Parser