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

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

Type Conversion

 

Article: Understanding COM References in Delphi

Load MHT as Email and Send

Download Chilkat Email ActiveX

Loads a web page saved as a .mht web archive as an email and sends it.

// Web pages saved as .mht files are nothing other than MIME text.  If you
// change the file extension to .eml, you can load it into Outlook Express
// and view it as an HTML email.  Using the Chilkat email component, you can
// load the MHT into an email object, add a subject, From, and To -- and then send.
procedure TForm1.Button19Click(Sender: TObject);
var
  email: IChilkatEmail2;
  ok: Integer;

begin
  // A ChilkatMailMan2 ActiveX component was dropped onto the Delphi
  // form, and this became the Form's member variable "ChilkatMailMan21".

  ChilkatMailMan21.UnlockComponent('Anything for 30-day trial');
  ChilkatMailMan21.SmtpHost := 'smtp.comcast.net';

  // Load a .MHT file, add a subject, From, and TO, and send.
  email := ChilkatMailMan21.NewEmail();
  email.LoadEml('invoice.mht');
  email.Subject := 'Email sent from a Delphi program!';
  email.From := 'Chilkat Support <support@chilkatsoft.com>';
  email.AddTo('TagTooga','admin@tagtooga.com');

  ok := ChilkatMailMan21.SendEmail(email);
  if (ok = 0) then
        ChilkatMailMan21.SaveLastError('errorLog.xml');

end;

 

 

Need a specific example? Send a request to support@chilkatsoft.com

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

Mail Component · .NET Email Component · XML Parser