/** * Forwards the message. Calling this method results in a call to EWS. * * @param bodyPrefix the body prefix * @param toRecipients the to recipients * @throws Exception the exception */ public void forward(MessageBody bodyPrefix, Iterable<EmailAddress> toRecipients) throws Exception { ResponseMessage responseMessage = this.createForward(); responseMessage.setBodyPrefix(bodyPrefix); responseMessage.getToRecipients() .addEmailRange(toRecipients.iterator()); responseMessage.sendAndSaveCopy(); }
/** * Forwards the message. Calling this method results in a call to EWS. * * @param bodyPrefix the body prefix * @param toRecipients the to recipients * @throws Exception the exception */ public void forward(MessageBody bodyPrefix, Iterable<EmailAddress> toRecipients) throws Exception { ResponseMessage responseMessage = this.createForward(); responseMessage.setBodyPrefix(bodyPrefix); responseMessage.getToRecipients() .addEmailRange(toRecipients.iterator()); responseMessage.sendAndSaveCopy(); }