We are using Davmail in server mode to connect RingCentral Engage Digital (using IMAP/SMTP) with O365 mailbox through EWS
RingCentral R&D team has shared their observations with us and discovered that Davmail IMAP server is not compliant. Therefore, emails cannot be imported on your customer's platform.
We fetch emails with RFC822 but here is what we receive from your end:
03 UID FETCH 175 RFC822
19 FETCH (UID 175 BODY[] {34246}
BODY[] is returned instead RFC822.
Here is an example of what we should receive from a compliant server:
04 UID FETCH 40885 RFC822
8371 FETCH (UID 40885 RFC822 {12029}
The problem is well located in ImapConnection.java in this pieze of code:
if ("RFC822.HEADER".equals(param)) {
buffer.append(" RFC822.HEADER");
} else {
buffer.append(" BODY[");
if (partIndexString != null) {
buffer.append(partIndexString);
}
buffer.append(']');
}
As you can observe only "RFC822.HEADER" param is taking into account to answer in the same way. So the solution should be something like this:
if ("RFC822".equals(param)) {
buffer.append(" RFC822");
} else if ("RFC822.HEADER".equals(param)) {
buffer.append(" RFC822.HEADER");
} else {
buffer.append(" BODY[");
if (partIndexString != null) {
buffer.append(partIndexString);
}
buffer.append(']');
}
We are using Davmail in server mode to connect RingCentral Engage Digital (using IMAP/SMTP) with O365 mailbox through EWS
RingCentral R&D team has shared their observations with us and discovered that Davmail IMAP server is not compliant. Therefore, emails cannot be imported on your customer's platform. We fetch emails with RFC822 but here is what we receive from your end: 03 UID FETCH 175 RFC822
The problem is well located in ImapConnection.java in this pieze of code:
As you can observe only "RFC822.HEADER" param is taking into account to answer in the same way. So the solution should be something like this: