Interface SmtpMessageHandler

All Known Implementing Classes:
SmtpMessageStorage

public interface SmtpMessageHandler
Represents a message handler that will process any incoming message.
  • Method Details

    • receive

      void receive(SmtpMessage smtpMessage)
      Receives the given smtpMessage.
      Parameters:
      smtpMessage - The message received within the transaction.
    • iterator

      Returns a new SmtpMessageIterator that loops over the received messages.
      Returns:
      A new SmtpMessageIterator instance.
    • readMessages

      List<SmtpMessage> readMessages()
      Retrieves the received messages and clears the list. If no new message has been received since the last notification, an empty list will be returned.
      Returns:
      All the (newly) received messages or an empty list if none.