Creating an Email Client with Borland Delphi - Improvements/Remarks
(Page 4 of 4 )
Giving persistence to your server login details: if you have more that one set of login details, you can use either an ini or text file to store your login details and get the application to read them in when it starts up. Alternatively, you can use the registry or a database to store these values if you are concerned about security. If you want to store the messages that you send, to reference later, you might want to create a small database to store them in.
Address Book: You can create a small Access database to store email addresses and retrieve them as and when necessary.
Message Sent notification
You will notice that nothing happens after you've sent a message. It is possible to greatly improve this by adding a progress bar that indicates that the message has been sent. Use IdSMTP's onwork, workbegin and onworkEnd event handlers, together with the progressbar. When the work is finished you could bring up a dialog saying "Message Sent" or something to that effect. This will assure the user that something is happening.
Possible bugs
Sometimes when I send messages to email addresses ending in ".co.uk" the application crashes. I've reported this to the Indy group, and hopefully this will be fixed in the near future.
What Next?
Although you are now able to send messages, what happens when you want to see what messages have been sent to you, or you want to see whether a message you sent has been received or not? That is what the next installment of this project will focus on. It will use the popular POP3 protocol to download all your messages from your POP3 server and allow you to read, reply to and delete them as you require.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |