Home   Buy Now   Products   Downloads   Support   Resellers   Contact   Site Map  
Home   Buy Now   Download   Support  
Email Component, SMTP Component, POP3 Component, IMAP Component, bulk mail

Home
Purchase
Upgrade
 
Products
Downloads
 
Support
 Samples
 KB
 Forum
 
Newsletter
 
Customers
 Current List
 Comments
 
Resellers
Jobs
Contact Us
 March 19, 2003  

Volume 1, Issue 3 

Page Navigator: << Back, 1, 2, 3, 4, 5, Next >>

Deleting Messages from the Server

How and when to delete messages from the POP3 server depends largely on the objectives of your applications.  Some POP3 applications delete the messages as soon as they are downloaded.  These applications typically store a copy of the messages locally and thus there is no need to keep them on the server.  However, removing messages from the server and storing them locally will make them unavailable from any computer other than the one that retained the local copy.  For this reason, many newer POP3 applications do not delete the message from the server, until you delete it from the local store.  Some applications, such as web based e-mail, do not delete the message or store a local copy.  The message is downloaded into memory each time it is accessed.  This enables the same messages to be easily accessed from different computers such as one at work and one at home.

The EasyMail POP3 object enables you to delete a message from the POP3 server in many different ways.  Here are some examples:

Delete a message from the server by its ordinal position:

'delete the message from the server
'where x is the messages ordinal position  
'of the message on the server
objPOP3.DeleteSingleMessage(x)

If the message you want to delete is in the POP3.Messages collection, you can delete it from the server like this:

'delete the first message in the Messages
'collection from the server
objPOP3.Messages(1).DeleteFromServer

You can also mark messages for deletion when they are downloaded with DownloadMessages() by passing in a 2 as the only parameter to the method:

objPOP3.DownloadMessages(2)

When a message is deleted from the server, the server flags the message for deletion but does not physically delete the message until the session is terminated.  The RollBack() method of the EasyMail POP3 object can be called prior to ending the session to un-flag the messages so they will not be deleted when the session ends.

Five things you can not do with POP3

POP3 is an effective, yet simple protocol.  Because it is simple, it will not do everything that you might want to do with your mail system.  Many of the limitations may be bridged by clever programming, but it is important to understand that they are not a part of the POP3 protocol.  I talk to lots of developers who are frustrated because they can not figure the command to do some operation on a POP3 server.  Many times the simple answer is that the command does not exist.  POP3 has a very limited command set.

Create Folders on the Server The POP3 protocol supports only one folder, the Inbox.  Clients such as Outlook Express enable users to manage a local store of downloaded messages on their hard drive, but it is important to understand that this is not a function of POP3.  If you want your application to store and manage downloaded messages, check out the EasyMail MailStore object.
Have two users logged into one mailbox at the same time The POP3 server will only allow one user to be logged in to a mailbox at one time.  It is important to properly disconnect from the POP3 server, or the mailbox may remain locked until a timeout occurs on the server.
Determine if a message has been read The POP3 protocol does not provide a mechanism for the server to indicate if messages have been read.  Clients such as Outlook Express store data on the local hard drive and thus can mark those messages as read or unread in the local store, but not on the server.
Determine if there are new messages on the server The POP3 protocol does not provide a mechanism to enable servers to indicate the number of new messages on the server.  Your application can store data locally and thus programatically determine the number of new messages on the server.  If you want your application to store and manage downloaded messages, check out the EasyMail MailStore object.
Sort the messages The POP3 server orders messages from oldest to newest.  The POP3 protocol does not support a mechanism to sort messages on the server.  Many applications simulate this by downloading the messages and then sort them locally prior to displaying them to the user. 

Next, bonus information on how to store, organize and manage downloaded messages on the local hard drive...

Page Navigator: << Back, 1, 2, 3, 4, 5, Next >>


In This Issue:

Learn the secrets of building a successful POP3 application. 

Plus:
Downloadable code to get you started right away


This Issue's Poll:

What are your plans for developing IMAP Applications?

Currently developing
Within 90 days
Within 12 months
Within 5 years
No plans


Signup for this Newsletter:

CRITICAL tips and tricks for e-mail developers


Quiksoft News:

For a limited time, Quiksoft is enabling developers to license the SMTP portion of EasyMail .Net Edition separately.



Customer Comments

"Quiksoft's technical support is excellent. I wish all of our vendors were as responsive and helpful with technical support requests. "

"It paid for itself just after this project."

"I think your product is fantastic. The documentation is clear and consise."

Read More...


E-mail this newsletter to a friend or to yourself:

Unsubscribe...

Printer Friendly Version...

©2003 Quiksoft Corporation. All rights reserved. Unauthorized duplication or distribution prohibited. Quiksoft, EasyMail, EasyMail Objects, EasyMail .Net Edition, EasyMail Advanced API, EasyMail SMTP Express, and MailStore are trademarks of Quiksoft Corporation. Other trademarks mentioned are the property of their legal owner.
©2010 Quiksoft Corporation. All rights reserved. Terms of Use, Privacy Statement, Trademarks