use of microsoft.exchange.webservices.data.core.service.response.ResponseMessage in project iaf by ibissource.
the class ExchangeFileSystem method forwardMail.
@Override
public void forwardMail(EmailMessage emailMessage, String destination) throws FileSystemException {
try {
ResponseMessage forward = emailMessage.createForward();
forward.getToRecipients().clear();
forward.getToRecipients().add(destination);
// if(forwardMessage != null){
// forward.setBodyPrefix(MessageBody.getMessageBodyFromText(forwardMessage));
// }
// if(getSaveCopy() == true){
// if(getFolderNameToSaveCopy() != null){
// forward.sendAndSaveCopy(retrieveFolderIdByFolderName(getFolderNameToSaveCopy()));
// } else {
// forward.sendAndSaveCopy();
// }
// } else {
forward.send();
// }
} catch (Exception e) {
throw new FileSystemException(e);
}
}
Aggregations