mail.setSubject(messageTitlePrefix() + message.title());
if (message.hasAttachments()) {
for (Enumeration attachmentEnumerator = message.attachments().objectEnumerator(); attachmentEnumerator.hasMoreElements();) {
File fileAttachment = ((ERCMessageAttachment)attachmentEnumerator.nextElement()).file();
mail.addAttachment(new ERMailFileAttachment(fileAttachment.getName(), null, fileAttachment));
}
}
return mail;
}