IMAP connected bounce filter delete issue

0
I am running the following code: Private Sub bounceInspector_Processed(ByVal sender As Object, ByVal e As ProcessedEventArgs) Handles bounceInspector.Processed Dim r As BounceInspectorResult = e.Result Dim sEmailAddress As String If r.MailMessage Is Nothing Then Return End If If r.Identified Then sEmailAddress = r.Addresses(0) Select Case r.BounceType.Code Case BounceType.Generic Select Case r.BounceCategory.Code Case BounceCategory.Subscribe, BounceCategory.Unsubscribe myResult = isValidEmail(sEmailAddress) If myResult.IsValid Then UpdateDB(sEmailAddress) Else "invalid address kill mail r.Delete = True r.InboxDelete = True End If Case Else "kill mail r.Delete = True r.InboxDelete = True End Select End Select End If End Sub I find that neither the file nor the mesage is removed. I am connecting to a folder via IMAP that is not the inbox. (inbox/unsubscribe) Should I be calling something to action the delete? Regards Duncan
edited 11/16/2017 12:41:33 AM
asked 12/30/2009 12:15:38 PM
add a comment

25 Answers

0
It"s working with new MailExpert :)
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Dear Duncan,

It will be fixed in the next hot fix. Please allow us up to 3 days.
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Hi Duncan, Yes, you can call it right after the ProcessMessages call. In the next release the Purge method will be called inside the ProcessMessages method.
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Dear Duncan, The hot fix is already on the server. Please log into our system and download it.
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Should I run the program twice to show the emails are not deleted? I can not attach the log and pasting the contents into the forum message crashes IE. I have run it on a mail bow with 3 items in it. Is there another way I can get the file to you?
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Hello, From the log, I see both AllowDelete and AllowInboxDelete are false. Please set it to true to allow delete messages.
 
answered 11/16/2017 12:41:33 AM
add a comment
0
The imap.disconnect is being called from the bounce component. What event should I add the imap.purge to and will the imap object be exposed or are you saying I should connect with my own object separately and do this?
 
answered 11/16/2017 12:41:33 AM
add a comment
0
I have changed my code to set allow delete on, I have sent you the log file for investigation.
 
answered 11/16/2017 12:41:33 AM
add a comment
0
If I want the IMAP client to peek where would I use the Peek for get message. Thanks
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Thanks, works perfectly. Can I use the purge to remove messages as they are processed rather than just at the end? As an aside issue I suspect there is an issue with one of the regex that are used as default. I find that using the standard rules that unsubscribe (the word) is recognised as a subscribe. It looks like that the check is for the word subscribe which is found in unsubcribe.
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Have you received them?
 
answered 11/16/2017 12:41:33 AM
add a comment
0
The mail has been sent. I included 4 sample emails as well as a screen shot of the grid used in the VB.Net demo IMAP app for the bounce inspector. Regards Duncan
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Hello, The BounceInspector class does not call imapClient.Disconnect(). You need to call it in your own code. The code is likely below: imap.Connect(...); ... bounce.ProcessMessages(...); ... imap.Purge(); imap.Disconnect(); ...
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Hello, Please send the log file to support@componentpro.com as I mentioned in the last post.
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Thanks for the feedback
 
answered 11/16/2017 12:41:33 AM
add a comment
0
I have sent it
 
answered 11/16/2017 12:41:33 AM
add a comment
0
I have just emailed the logs to you. The subject of the mail is the same as the forum item.
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Thanks for the answer. Am I correct in my assessment of the way you are processing the word SUBSCRIBE?
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Hello,

Please make sure bounceInspector.AllowDelete = true and bounceInspector.AllowInboxDelete = true. Can you please send us the log file generated by our BounceInspector component?
 
answered 11/16/2017 12:41:33 AM
add a comment
0
Hello,

Can you please send us the log file for both imap and bounceInspector to support@componentpro.com.
 
answered 11/16/2017 12:41:33 AM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged imap or ask your own question.