Interface OutgoingMessageHandler
public interface OutgoingMessageHandler
This handler provides functionality 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 class
Represents options to send a message -
Method Summary
Modifier and TypeMethodDescriptionjakarta.mail.Message
sendMessage
(jakarta.mail.Message message, Account account, OutgoingMessageHandler.SendOptions sendOptions) Appends aMessage
to the central outgoing message folder to be sent by a specificAccount
.
-
Method Details
-
sendMessage
jakarta.mail.Message sendMessage(jakarta.mail.Message message, Account account, OutgoingMessageHandler.SendOptions sendOptions) throws jakarta.mail.MessagingException, ValidationException Appends aMessage
to the central outgoing message folder to be sent by a specificAccount
. Please note that the specifiedAccount
to send the message must be able to send messagesAccount.isSendAllowed()
. Otherwise aValidationException
will be thrown. The message will be sent asynchronously by the novomind iAGENT core process. In case of aPermanentMessagingException
during the send operation the message remains flagged on the central outgoing folder and requires manual action by a supervisor.- Parameters:
message
- theMessage
to be sentaccount
- theAccount
to be used to send the messagesendOptions
- theOutgoingMessageHandler.SendOptions
for 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
-