Search in sources :

Example 1 with ResponseMessage

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);
    }
}
Also used : ResponseMessage(microsoft.exchange.webservices.data.core.service.response.ResponseMessage) URISyntaxException(java.net.URISyntaxException) ServiceLocalException(microsoft.exchange.webservices.data.core.exception.service.local.ServiceLocalException) ServiceVersionException(microsoft.exchange.webservices.data.core.exception.service.local.ServiceVersionException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) ServiceResponseException(microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException) IOException(java.io.IOException) ConfigurationException(nl.nn.adapterframework.configuration.ConfigurationException)

Aggregations

IOException (java.io.IOException)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 URISyntaxException (java.net.URISyntaxException)1 ServiceLocalException (microsoft.exchange.webservices.data.core.exception.service.local.ServiceLocalException)1 ServiceVersionException (microsoft.exchange.webservices.data.core.exception.service.local.ServiceVersionException)1 ServiceResponseException (microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException)1 ResponseMessage (microsoft.exchange.webservices.data.core.service.response.ResponseMessage)1 ConfigurationException (nl.nn.adapterframework.configuration.ConfigurationException)1