Creating an Email Client with Borland Delphi: conclusion
(Page 1 of 4 )
In this follow up to "Creating an Email Client with Borland Delphi," we look at how to download and read messages from an email server. By the end of this article, you will have a fully functional Mail Client.
A downloadable zip of the source code is available here.
Introduction
This is a follow up to my previous article, "Creating an Email Client with Borland Delphi." In that article we focused mainly on sending email messages and ensuring that the message arrives at the intended person's email address. We did this by using the idsmtp and tidmessage components. TidMessage deals with the actual message parts (where the message goes, the subject, who it is from, and so on) and the idsmtp communicates with the recipients' smtp server -- in other words, it sends the message. In this installment we are going to look at how to download and read messages from an Email Server. What I'm going to do is to use the code of the application that I created in the previous tutorial (code to send email messages) and combine it with this one. This will give us a fully functional Mail Client.
The overall aim of this series of tutorials is to show how easy it is to use Indy10 components with Delphi, as there are virtually no examples on the Internet of how to use it.
Requirements for this Application:
- We want the application to download messages.
- We want it to be able to read and reply to messages.
- We want to be able to delete messages from the server.
What you need
You need to have Indy 9 or 10 installed. If you have Delphi 6 and above, then you can skip this section; otherwise go to www.indyproject.org and download the version appropriate to your Delphi version. I am using Delphi 7 and Indy 10.0.52. There are proper guides on how to install Indy on your computer.
Second, I'm writing this tutorial on the assumption that you know how to use Delphi. If this is not the case then I would recommend you go to http://delphi.about.com for a beginner's course, before continuing.
Third, you need to have a pop3 account. You usually get this from your ISP or hosting company.
Let's get started!
Next: What is POP3? >>
More Delphi-Kylix Articles
More By Jacques Noah