Search The ForumSearch   RegisterRegister  LoginLogin

MailBee Objects

 AfterLogic Forum : MailBee Objects
Subject Topic: Delete all email after reading Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
noxon
Newbie
Newbie


Joined: 07 October 2017
Online Status: Offline
Posts: 2
Posted: 07 October 2017 at 2:47am | IP Logged Quote noxon

Hi,
I used mailbee oject for read email header and save to header info sql database. After saving delete all email messages. But only delete one email message (Error #216, [Error: message deletion failed]). How can i delete all email messages?

Best regards,
Back to Top View noxon's Profile Search for other posts by noxon
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 1989
Posted: 08 October 2017 at 3:59am | IP Logged Quote Alex

Hi,

Perhaps, the server limits the number of operations per session (so you can't delete all mails at once). It's hard to say for sure. Maybe you can post the log here to see what happens exactly?

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


Joined: 07 October 2017
Online Status: Offline
Posts: 2
Posted: 09 October 2017 at 3:16am | IP Logged Quote noxon

Hi master,
My asp code;
If Not objPOP3.IsError Then
    ' Display "From:", "To:", "Subject:" for each message
    For Each objMsg In objMsgs
    
         mail.execute(INSERT INTO ...)
     objPOP3.DeleteMessage 1
    Next
Else
    ' Display error information
    Response.Write "Error #" & objPOP3.ErrCode & ", " & objPOP3.ErrDesc
End If

' Close the connection
objPOP3.Disconnect
Else
' Display error information
Response.Write "Error #" & objPOP3.ErrCode & "<br>"
Response.Write "Server response: " & objPOP3.ServerResponse
End If

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

Joined: 19 November 2003
Online Status: Offline
Posts: 1989
Posted: 09 October 2017 at 6:22am | IP Logged Quote Alex

Hi,

You're deleting the same message all the time (DeleteMessage 1). You need to use For I = 1 To objPOP3.MessageCount loop and delete message #I, not 1.

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