-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Safely read message subject for debug message #3597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
If Spring Boot Integration Mail is connected to a Domino mail server via IMAP, it can happen from time to time that a message is expunged. This leads to a MessageRemovedException when calling IMAPMessage#getSubject. And although Debug is set to false this again leads to a MessageException and the whole integration flow stops.
|
@domi-87 Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
|
@domi-87 Thank you for signing the Contributor License Agreement! |
|
@domi-87 , thank you for contribution, but I'm not sure how this Do I miss anything? |
|
thanks for your reply. We have implemented a filter ( |
|
Hm. How about to have that |
|
The problem arises together with IMAP messages only as for expunged IMAP messages The commit of @domi-87 enables the users to filter such expunged IMAP messages by manually filtering them via the @artembilan Calling |
|
Yeah... I see your point. So, isn't it will be more natural to call |
|
You mean something like I think this would be a clean solution for IMAP messages. I'm not sure whether this works for other message types. E.g., can POP3 messages also be expunged and if so, do they contain any useful information the user might be interested in? If yes, such a change would prevent the user to do useful stuff with the information that an expunged message was retrieved. Nevertheless, other reasons for exceptions when calling
If we want to be sure that the message processing is not aborted, we need to really catch the exceptions which might be thrown by the call to |
|
I think we still go the current |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Although may we have a simple unit (mock?) test to cover this functionality after messages selection? See ImapMailReceiverTests as a place where this can be added as a new test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Merging after adding your name to the @author list
If Spring Boot Integration Mail is connected to a Domino mail server via IMAP, it can happen from time to time that a message is expunged. This leads to a MessageRemovedException when calling IMAPMessage#getSubject. And although Debug is set to false this again leads to a MessageException and the whole integration flow stops.