Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 2 - Creating an Email Client with Borland Delp...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Creating an Email Client with Borland Delphi: conclusion
By: Jacques Noah
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2005-10-25

    Table of Contents:
  • Creating an Email Client with Borland Delphi: conclusion
  • What is POP3?
  • Code
  • Deleting a message

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Creating an Email Client with Borland Delphi: conclusion - What is POP3?


    (Page 2 of 4 )

    POP3 stands for Post Office Protocol version 3 and is used to handle email between the email server and our local email client (such as Outlook or Eudora). POP3 is used to authenticate our credentials on the server and download email that comes from across the Internet to our email account. Use of the POP3 protocol is activated when we click on the "Receive" button in our email client. Until this happens our email will stay on the email server.

    Indy10 has a component called idPOP3 that enables us to work with an email server (to receive messages) and mail client (to download messages from the email server). Take a look at the diagram above to understand what role POP3 plays in sending an email message.

    Building the GUI

    Now that we got that out of the way, let's get busy. Fire up Delphi and start a new application. Add two more forms to the project. We will use the first form to download and read our messages, the second to send messages, and the third to read messages with an option to reply. Remember, we are going to use the code from the first tutorial to send messages, so it will probably be wise to add that code into the second form around now, as I will NOT discuss sending messages in this tutorial.

    Go to the Indy clients tab and select idpop3, add it to the first form, then go to the Indy Misc tab and select and add the idMessage component. Once you've added these two, rename idpop3 to pop and idmessage to mess. For those who are not familiar with Delphi, click on the component and then go to the object inspector (bottom left hand corner of screen) and change the name there. This speeds things up a bit when you start to write the code.

    Indy Idpop3/idMessage Components:                                              

    IdPOP3 Component

    IdMessage Component

    Add two listviews, a memo, four panels, one status bar, four static text labels, four labels and four buttons. Rename Listview1 to lv1 and listview2 to lvAttachments. Now, click on lv1, go to vstyle, and change it to vsReport; do the same for lvAttachments. Double click on lv1 and add the following fields: From, Subject, Date and Size. Double click on lvAttachments and type "Attachment(s)". Arrange them on the form so that it looks something like this:

    On the third form: drop three edit boxes, two buttons, a memo, four static text labels and one tlabel. Give the statictext the following captions: From, To, Subject and Date. Arrange to suit. It should look something like this:

    The second form is the one that we will use to send messages with. Remember to use the code from the previous tutorial to build this form.

    I've designed this (and indeed the entire application) to be as simplistic as possible, so feel free to add more widgets and colors to suit.

    More Delphi-Kylix Articles
    More By Jacques Noah


       · For thos of you who want to know more about how to use Delphi and MS Access go to...
     

    DELPHI-KYLIX ARTICLES

    - 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...
    - Using the Client Dataset in Two-Tiered Clien...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT