Home arrow Delphi-Kylix arrow Creating an Email Client with Borland Delphi
DELPHI-KYLIX

Creating an Email Client with Borland Delphi


If you have ever wanted to send email messages from your Delphi application, this article is for you. Jacques Noah explains how to use the open source Indy suite to set up an full fledged Mail Client.

Author Info:
By: Jacques Noah
Rating: 5 stars5 stars5 stars5 stars5 stars / 47
October 18, 2005
TABLE OF CONTENTS:
  1. · Creating an Email Client with Borland Delphi
  2. · What you need
  3. · Coding
  4. · Improvements/Remarks

print this article
SEARCH DEVARTICLES

Creating an Email Client with Borland Delphi
(Page 1 of 4 )


A downloadable zip of the source code is available here.

Introduction

There are many ways to send email messages from your Delphi application; for example, you can use shellexecute by declaring ShellApi in your uses list, or you can simply use Delphi's built in support for Windows Simple Mail Api, but this requires MS Outlook to be installed both on your computer and that of the recipient. The other downside to this is that you will not be able to send attachments, so neither of these options are ideal.

Another approach is to use Indy. Indy is a group of Internet components that comprises all popular Internet protocols, such as POP3, HTTP, ICMP, and so on. Although there are lots of other free Internet component suites available, most of them do not have the standard of quality that you find in the Indy components. The only problem I find with Indy components is that there is not enough support available on their usage. This is mainly because Indy is an open source project and the development of demos to demonstrate how to use the components is very slow.

A recent major change, which brought about Indy 10, was made for the Dot Net Framework and as this is the latest version, appropriate for both the Dot Net and Win32 platforms, it is suffering from a severe lack of demos. I am therefore writing this tutorial to show how to use some of the components available in the latest version of Indy. Despite these problems, Indy components remain popular among Delphi developers and are by far the easiest and most efficient way to write Internet related applications.

To start with, we are going to create an email application that is going to provide us with a basis for building a full fledged Mail Client. A mail client has two primary roles: one, to receive messages and two, to send messages. We will be focussing on sending messages. This application will be able to send messages, both with and without attachments, and will also give us a way to ascertain whether the message has been delivered to the recipient. For those of you who cannot afford Microsoft's Outlook Express or who want their own Mail Client that will do exactly what you want it to do, please read on.

Requirements for this Application:

  • We want the application to send messages 
    (obviously!).
  • We want it to be able to send attachments 
    (both single and multiple).
  • We want confirmation of receipt and delivery (confirmation message should be send to your email address).


blog comments powered by Disqus
DELPHI-KYLIX ARTICLES

- Loading an XML Document into the DOM
- Delphi Wrapper Classes and XML
- Delphi and the DOM
- Delphi and XML
- Internet Access: Client Service
- Finishing the Client for an Internet Access ...
- The Client for an Internet Access Control Ap...
- User Management for an Internet Access Contr...
- Important Procedures for an Internet Access ...
- Server Code for an Internet Access Control A...
- Constructing the Interface for an Internet A...
- Building a Server Application for an Interne...
- Building an Internet Access Control Applicat...
- Client Dataset: Working with Data Packets an...
- Using the Client Dataset in an N-Tiered Appl...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials