| 479 | | |
| 480 | | FetchEnvelopeResponse[] envResponses = new FetchEnvelopeResponse[(lastIndex - firstIndex)+1]; |
| 481 | | |
| 482 | | // Pre-process the returned text to clean up mid-field line breaks |
| | 479 | return prepareFetchEnvelopeResponse(rawList); |
| | 480 | } |
| | 481 | |
| | 482 | /** |
| | 483 | * Execute the "UID FETCH (FLAGS UID ENVELOPE)" command |
| | 484 | * @param uidNext Unique ID of the next message |
| | 485 | * @return Array of FetchEnvelopeResponse objects |
| | 486 | */ |
| | 487 | public FetchEnvelopeResponse[] executeFetchEnvelopeUid(int uidNext) throws IOException, MailException { |
| | 488 | if(EventLogger.getMinimumLevel() >= EventLogger.DEBUG_INFO) { |
| | 489 | EventLogger.logEvent( |
| | 490 | AppInfo.GUID, |
| | 491 | ("ImapProtocol.executeFetchEnvelopeUid("+uidNext+")").getBytes(), |
| | 492 | EventLogger.DEBUG_INFO); |
| | 493 | } |
| | 494 | |
| | 495 | String[] rawList = execute("UID FETCH", |
| | 496 | Integer.toString(uidNext) + ":*" + |
| | 497 | " (FLAGS UID ENVELOPE)"); |
| | 498 | |
| | 499 | return prepareFetchEnvelopeResponse(rawList); |
| | 500 | } |
| | 501 | |
| | 502 | private FetchEnvelopeResponse[] prepareFetchEnvelopeResponse(String[] rawList) throws IOException, MailException { |
| | 503 | // Preprocess the returned text to clean up mid-field line breaks |