Message[] messages = new Message[5];
for (int i = 0; i < 5; i++) {
messages[i] = new MimeMessage(sender.getSession());
messages[i].setText("Message " + i);
}
folder.appendMessages(messages);
folder.close(true);
}
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {