Class MockMailboxImpl

java.lang.Object
io.quarkus.mailer.runtime.MockMailboxImpl
All Implemented Interfaces:
MockMailbox

public class MockMailboxImpl extends Object implements MockMailbox
Mock mailbox bean, will be populated if mocking emails.
  • Constructor Details

    • MockMailboxImpl

      public MockMailboxImpl()
  • Method Details

    • send

      io.smallrye.mutiny.Uni<Void> send(Mail email, io.vertx.ext.mail.MailMessage mailMessage)
    • getMessagesSentTo

      public List<Mail> getMessagesSentTo(String address)
      Description copied from interface: MockMailbox
      Returns a list of mails sent to the given address, whether it was via To, Cc or Bcc.
      Specified by:
      getMessagesSentTo in interface MockMailbox
      Parameters:
      address - the email address we want to retrieve mail from
      Returns:
      a list of messages sent to the given address, possibly empty.
    • getMailsSentTo

      public List<Mail> getMailsSentTo(String address)
      Description copied from interface: MockMailbox
      Returns a list of mails sent to the given address, whether it was via To, Cc or Bcc.
      Specified by:
      getMailsSentTo in interface MockMailbox
      Parameters:
      address - the email address we want to retrieve mail from
      Returns:
      a list of mails sent to the given address, possibly empty.
    • getMailMessagesSentTo

      public List<io.vertx.ext.mail.MailMessage> getMailMessagesSentTo(String address)
      Description copied from interface: MockMailbox
      Returns a list of mail messages sent to the given address, whether it was via To, Cc or Bcc.
      Specified by:
      getMailMessagesSentTo in interface MockMailbox
      Parameters:
      address - the email address we want to retrieve mail from
      Returns:
      a list of mail messages sent to the given address, possibly empty.
    • clear

      public void clear()
      Description copied from interface: MockMailbox
      Removes every sent message.
      Specified by:
      clear in interface MockMailbox
    • getTotalMessagesSent

      public int getTotalMessagesSent()
      Description copied from interface: MockMailbox
      Gets the total number of messages sent. This counts every message sent to every recipient.
      Specified by:
      getTotalMessagesSent in interface MockMailbox
      Returns:
      the total number of messages sent.