as I’m migrating a CUBA 7.2 project to Jmix 2.3, I need to implement mailbox monitoring and react to the events, that I did with the IMAP addon, which does not exist for Jmix.
Do you have any recommendations or experience regarding the replacement?
I know I can use Java mail API, but I’m looking for something ready to use as my time is limited.
I can also use CUBA 7.2 application with IMAP and REST just to use the IMAP addon, but it can’t connect to services such as Microsoft 365 business e-mail mailbox due to increased security requirements.
In most cases, working with IMAP involves monitoring the mailbox and reacting to new messages. This doesn’t require much coding and can be easily implemented in a project.
Here is the example. Is uses the implementation 'org.eclipse.angus:angus-mail' as an implementation of Jakarta Mail specification.
You need to define a bean for mail Session and a bean that will read the messages: MailReader.