* @throws MailboxException
*/
public static MessageResult loadMessageResult(final Message<?> message, final FetchGroup fetchGroup)
throws MailboxException {
MessageResultImpl messageResult = new MessageResultImpl();
messageResult.setUid(message.getUid());
if (fetchGroup != null) {
int content = fetchGroup.content();
messageResult.setFlags(message.createFlags());
messageResult.setSize((int)message.getFullContentOctets());
messageResult.setInternalDate(message.getInternalDate());
try {
if ((content & FetchGroup.HEADERS) > 0) {
addHeaders(message, messageResult);