TemplateMessageManipulator

since v10.0.16

The extension point TemplateMessageManipulator is a java interface you can implement if you want to manipulate the generated template message.
This template message is generated for each incoming message by the novomind iAGENT core process.

Your plugin receives the template message as a javax.mail.Message and an information object about the incoming message.

To manipulate this template message you could for example add X-Headers to provide additional information. For a complete example take a look at the Hello World Core X-Header App.

  @Override
  public PreProcessingResult preProcess(Message templateMessage, IncomingMessageInfo messageInfo) {
    try {
      templateMessage.addHeader("X-HelloWorld", "0815");
    } catch (MessagingException e) {
      log.warn("Failure adding header \"X-HelloWorld: 0815\": ", e);
    }
    return PreProcessingResult.OK;
  }