| Author |  | 
      
        | Guest Guest Group
 
  
 
 Joined: 10 November 2003
 Online Status: Online
 Posts: 262
 | 
          Does Mailbee Pop3 support deleting individual e-mail as specified?
           | Posted: 25 October 2005 at 5:56pm | IP Logged |   |  
           | 
 |  
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          Yes, you can use POP3.DeleteMessage method to delete individual messages:
           | Posted: 26 October 2005 at 8:49am | IP Logged |   |  
           | 
 |  
 
| Code: 
 
    
    | 
      
       | ' Assuming we're already connected to the server,
 ' delete the first message from the inbox
 POP3.DeleteMessage 1
 POP3.Disconnect
 
 |  |  |  
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Chris Guest Group
 
  
 
 Joined: 10 November 2003
 Online Status: Online
 Posts: 262
 | 
          I have a VBScript and I'm calling the deletemessage method.
           | Posted: 23 March 2006 at 3:58pm | IP Logged |   |  
           | 
 |  
 I'm getting +OK back from my Exchange 2000 server.
 
 However, the message isn't being deleted.
 
 Any ideas?
 
 spit just outputs the string.
 
 Code:
 
 for i = 1 to opop.MessageCount
 set msg = opop.RetrieveSingleMessage(i)
 spit "from: " & msg.FromAddr
 spit " : " & msg.Subject
 
 bretval = opop.DeleteMessage(i)
 spit opop.ServerResponse
 if  bretval-0 then
 spit "Msg " & i & " deleted."
 else
 spit "error!"
 end if
 
 next
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          When calling DeleteMessage method, the selected messages are just marked as deleted, but are not indeed removed from the mail server.
           | Posted: 24 March 2006 at 7:48am | IP Logged |   |  
           | 
 |  
 The developer should also call POP3.Disconnect method to submit the deletion of the marked messages.
 
 NOTE: if the POP3.Disconnect method is not called and the connection is broken, all messages marked for deletion will not be deleted.
 
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  |