We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
When trying to read all the content of an email, the email is deleted. It seems to happens whatever the function we call on MimeMultipart
MimeMultipart
To Reproduce Steps to reproduce the behavior:
Properties properties = new Properties(); properties.put("mail.store.protocol", "pop3s"); properties.put("mail.pop3s.host", "pop.gmail.com"); properties.put("mail.pop3s.port", "995"); properties.put("mail.pop3s.auth", true); properties.put("mail.pop3s.starttls.enable", true); Session session = Session.getInstance(properties); Store store = session.getStore(); store.connect("[email protected]", "password"); Folder folder = store.getFolder("INBOX"); folder.open(Folder.READ_ONLY); // Let's say we have 20 messages. System.out.println("NB of elements: " + folder.getMessageCount()); Message message = folder.getMessages()[0]; MimeMultipart mimeMultipart = (MimeMultipart) message.getContent(); mimeMultipart.getCount(); folder.close(); folder.open(Folder.READ_ONLY); // We have only 19 messages left System.out.println("NB of elements: " + folder.getMessageCount()); folder.close();
Expected behavior
The email should not be deleted.
Screenshots
Desktop (please complete the following information):
Mail server:
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Could you run it adding this line and copy paste the output, please?. properties.put("mail.debug", "true");
properties.put("mail.debug", "true");
I am trying it with this example and it is not removing it https://github.com/jbescos/jakartaEE10MailDemo
Sorry, something went wrong.
jbescos
No branches or pull requests
Describe the bug
When trying to read all the content of an email, the email is deleted.
It seems to happens whatever the function we call on
MimeMultipart
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The email should not be deleted.
Screenshots
Desktop (please complete the following information):
Mail server:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: