Author |
|
Guests Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 28 November 2004 at 1:31pm | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 28 November 2004 at 2:35pm | IP Logged
|
|
|
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 |
|
|
Guests Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 15 December 2004 at 2:22pm | IP Logged
|
|
|
oPop3.GetMessageNumberFromUID(myUID) always returns 0x0 for me.
Why?
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 16 December 2004 at 7:46am | IP Logged
|
|
|
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 |
|
|