Interface OutgoingMessageHandler
public interface OutgoingMessageHandler
This handler provides functionality to access the messages on the
central outgoing message folder.
It also allows to append a
Message to the central outgoing
message folder to be sent by a specific Account. The appended
message will be sent asynchronously by the novomind iAGENT core process.
The OutgoingMessageHandler is injectable in the novomind iAGENT routing
process and also in the novomind iAGENT Desk- and core process.- Since:
- 12.9
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classRepresents options to send a message -
Method Summary
Modifier and TypeMethodDescriptionjakarta.mail.MessagesendMessage(jakarta.mail.Message message, Account account, OutgoingMessageHandler.SendOptions sendOptions) Appends aMessageto the central outgoing message folder to be sent by a specificAccount.stream()Returns aStreamover theOutgoingMessageInfoelements on the central outgoing message folder as its source that are related to a ticket.
-
Method Details
-
stream
Stream<OutgoingMessageInfo> stream()Returns aStreamover theOutgoingMessageInfoelements on the central outgoing message folder as its source that are related to a ticket. TheOutgoingMessageInfoprovides theOutgoingMessageand the relatedTicket. Please note that there may be more than one element for the same relatedTicketon the central outgoing message folder, e.g. a confirmation and an intermediate reply or an external forwarded message that are all related to the sameTicketand waiting to be sent.- Returns:
- a
Streamover theOutgoingMessageInfoelements as its source. - Since:
- 13.15
-
sendMessage
jakarta.mail.Message sendMessage(jakarta.mail.Message message, Account account, OutgoingMessageHandler.SendOptions sendOptions) throws jakarta.mail.MessagingException, ValidationException Appends aMessageto the central outgoing message folder to be sent by a specificAccount. Please note that the specifiedAccountto send the message must be able to send messagesAccount.isSendAllowed(). Otherwise aValidationExceptionwill be thrown. The message will be sent asynchronously by the novomind iAGENT core process. In case of aPermanentMessagingExceptionduring the send operation the message remains flagged on the central outgoing folder and requires manual action by a supervisor.- Parameters:
message- theMessageto be sentaccount- theAccountto be used to send the messagesendOptions- theOutgoingMessageHandler.SendOptionsfor the message- Returns:
- the message after it has been successfully appended to the outgoing message folder
- Throws:
jakarta.mail.MessagingException- in case of invalid messageValidationException- in case of invalid or inappropriate account- Since:
- 12.9
-