Class LoggingMailDispatcher

java.lang.Object
com.onec.mail.dispatch.LoggingMailDispatcher
All Implemented Interfaces:
MailDispatcher

public class LoggingMailDispatcher extends Object implements MailDispatcher
Dev dispatcher (provider=log). Logs the message instead of sending it. Useful in local/test profiles where no real provider should be hit.
  • Constructor Details

    • LoggingMailDispatcher

      public LoggingMailDispatcher()
  • Method Details

    • name

      public String name()
      Description copied from interface: MailDispatcher
      Stable provider id, e.g. "smtp", "sendgrid", "ses".
      Specified by:
      name in interface MailDispatcher
    • dispatch

      public void dispatch(MailMessage message)
      Description copied from interface: MailDispatcher
      Synchronously deliver a message to the provider. Throws MailDeliveryException on failure.
      Specified by:
      dispatch in interface MailDispatcher