Author |
|
noxon Newbie
Joined: 07 October 2017
Online Status: Offline Posts: 2
|
Posted: 07 October 2017 at 2:47am | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 08 October 2017 at 3:59am | IP Logged
|
|
|
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 |
|
|
noxon Newbie
Joined: 07 October 2017
Online Status: Offline Posts: 2
|
Posted: 09 October 2017 at 3:16am | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 09 October 2017 at 6:22am | IP Logged
|
|
|
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 |
|
|