Package io.quarkus.mailer.runtime
Class MockMailboxImpl
- java.lang.Object
-
- io.quarkus.mailer.runtime.MockMailboxImpl
-
- All Implemented Interfaces:
MockMailbox
@ApplicationScoped public class MockMailboxImpl extends Object implements MockMailbox
Mock mailbox bean, will be populated if mocking emails.
-
-
Constructor Summary
Constructors Constructor Description MockMailboxImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes every sent message.List<Mail>
getMessagesSentTo(String address)
Returns a list of mails sent to the given address, whether it was via To, Cc or Bcc.int
getTotalMessagesSent()
Gets the total number of messages sent.(package private) io.smallrye.mutiny.Uni<Void>
send(Mail email)
-
-
-
Method Detail
-
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 interfaceMockMailbox
- Parameters:
address
- the email address we want to retrieve mail from- Returns:
- a list of 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 interfaceMockMailbox
-
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 interfaceMockMailbox
- Returns:
- the total number of messages sent.
-
-