We are using spring integration to poll the emails from outlook box.
Intermittently, we are seeing these exceptions.
Javax.mail.MessagingException: A4400 NO Server Unavailable javax.mail.MessagingException: A3 BAD User is authenticated but not connected.;
02:20:03.858 [task-scheduler-2] ERROR o.s.i.handler.LoggingHandler - org.springframework.messaging.MessagingException: failure occurred while polling for mail; nested exception is javax.mail.MessagingException: A4400 NO Server Unavailabl e. 15; nested exception is: com.sun.mail.iap.CommandFailedException: A4400 NO Server Unavailable. 15 at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:131) at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:224) at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:245) at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:58)
02:20:05.321 [task-scheduler-2] ERROR o.s.i.handler.LoggingHandler - org.springframework.messaging.MessagingException: failure occurred while polling for mail; nested exception is javax.mail.MessagingException: A3 BAD User is authenticated but not connected.; nested exception is: com.sun.mail.iap.BadCommandException: A3 BAD User is authenticated but not connected. : at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:131)
Code snippet:
@Bean public IntegrationFlow imapIdleFlow() { return IntegrationFlows .from( Mail.imapInboundAdapter() .searchTermStrategy((f, l) ->) .javaMailProperties(p -> p .put("mail.debug", ) .put("mail.imap.connectionpoolsize", ))
I don't get the solution When I surfed the solution for this.