Delphi Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

Delphi Examples

Bounced Mail
Bz2
Character Encoding
CSV
DKIM / DomainKey
Digital Certificates
Digital Signatures
DH Key Exchange
DSA
Email
Email Object
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
NTLM
POP3
RSA
S/MIME
SMTP
Socket
Spider
SFTP
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Byte Array
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

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;

 

 

© 2000-2010 Chilkat Software, Inc. All Rights Reserved.

Mail Component · .NET Email Component · XML Parser