Search The ForumSearch   RegisterRegister  LoginLogin

MailBee POP3

 AfterLogic Forum : MailBee POP3
Subject Topic: Delete message by UID Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Guests
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 28 November 2004 at 1:31pm | IP Logged Quote Guests

Hi,

I'm having little bit of a problem with mail deleting, I'm sure it's very easy to fix but I can't figure it out and it's frustrating. Anyway...

The delete meail method only works with message index and I'm having a hard time tracking the message index of messages, and I sometimes end up deleting messages that I don't want to. Is there any other method that deletes messages by UID ? or some other property ? I could not find that in the help documents.

Thanks

Back to Top View Guests's Profile Search for other posts by Guests
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 28 November 2004 at 2:35pm | IP Logged Quote Alex

You can use GetMessageNumberFromUID to obtain message number from UID and then pass this number to DeleteMessage method.

n = POP3.GetMessageNumberFromUID(myUID)
If n > 0 Then
POP3.DeleteMessage n
Else
MsgBox "Invalid UID!"
End If

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Guests
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 15 December 2004 at 2:22pm | IP Logged Quote Guests

oPop3.GetMessageNumberFromUID(myUID) always returns 0x0 for me.

Why?
Back to Top View Guests's Profile Search for other posts by Guests
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 16 December 2004 at 7:46am | IP Logged Quote Alex

Are you sure you already connected to mail server to the moment of calling GetMessageNumberFromUID method?

E.g:

Set POP3 = CreateObject("MailBee.POP3")
POP3.LicenseKey = "key"
If POP3.Connect("mail.server.com", 110, "user", "pass") Then
n = POP3.GetMessageNumberFromUID(uid)
End If

If this is not the issue, are you sure the message with the specified UID still present in the mail account (e.g. it has not been already deleted?)

Also, make sure UID itself is valid. If it's enclosed in angle brackets "<>", remove them before passing value to GetMessageNumberFromUID method.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide