Interface MessageTransaction


  • public interface MessageTransaction
    The transaction defines the context of an incoming message. So it can be processed by the routing script without knowing if it was delivered via IMAP (to the IMAPAgent) or via SMTP (to the SMTPAgent).
    Since:
    jadice server 4.2.1.6
    • Method Detail

      • getMessage

        javax.mail.internet.MimeMessage getMessage()
        Returns:
        The Message itself.
      • getMessageID

        String getMessageID()
        Returns:
        The Message ID (from the mail header)
      • getRecipients

        List<String> getRecipients()
        Returns:
        All recipients as specified in the mail header
      • reject

        void reject​(MessageTransaction.Reason reason,
                    String message)
        Rejects the given message and causes to abort the transaction.
        Parameters:
        reason - Why the transaction was rejected
        message - A more detailed message.
      • getRemoteAddress

        SocketAddress getRemoteAddress()
        Returns:
        The location from where the message was delivered (if applicable)
      • fileError

        void fileError​(String destination,
                       String reason,
                       String bodySubtype,
                       String body)
        File an error message. It is implementation specific how the transaction will handle this.
        Parameters:
        destination - A recipient of the error report.
        reason - The reason of the error
        bodySubtype - the subtype of the message. (i.e. "plain" or "html")
        body - A detailed report.
      • send

        void send​(javax.mail.internet.MimeMessage message)
           throws javax.mail.MessagingException
        Send a Message.
        Parameters:
        message - The Message to send
        Throws:
        javax.mail.MessagingException
      • getIDHash

        String getIDHash​(DupeDetection dupeDetection)
        Get an ID Hash that is valid in the context of the given DupeDetection mode. That means that in one DupeDetection mode, two mails can have the same, but in another mode those two mails can a different ID Hash.
        Parameters:
        dupeDetection - The context of the requested ID Hash
        Returns:
        An ID Hash