PreSendMessageManipulator

since v10.0.42

The extension point PreSendMessageManipulator is a java interface that can be implemented to manipulate the message before being sent to the customer.

Your plugin receives the pre-send-message as a javax.mail.Message and other parameters containing additional information about the message to be sent. You may modify the pre-send-message to e.g. add X-Headers or attachments.

Please note that the parameter answerType specifies the type of the operation. In most cases the AnswerType.DEFAULT indicates the sending of the final answer of a ticket. But there are also other types of answer operations e.g. intermediate reply or confirmation messages. When implementing this extension point you need to decide which types of answers you need to process.

Your plugin may influence the workflow in case of an error. By throwing a TemporaryMessagingException the plugin indicates that the attempt to send the message should be cancelled at that moment and retried again after a short time period. By throwing a PermanentMessagingException the plugin indicates that the attempt to send the message should be cancelled and that the message should be marked as a send failure in the outgoing folder. The detail message of the exception will be visible in the tickets course.