Interface SmtpMessageHandler

All Superinterfaces:
SmtpServerListener
All Known Implementing Classes:
DefaultSmtpMessageHandler

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

    • messageReader

      Returns a new SmtpMessageReader that loops over the received messages. Note that if you create multiple SmtpMessageReader instances, the will compete over the same message list and the messages will be received only by one of the readers.
      Returns:
      A new SmtpMessageReader 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.