Package io.quarkus.mailer.runtime
Class MockMailboxImpl
java.lang.Object
io.quarkus.mailer.runtime.MockMailboxImpl
- All Implemented Interfaces:
MockMailbox
Mock mailbox bean, will be populated if mocking emails.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes every sent message.List<io.vertx.ext.mail.MailMessage>
getMailMessagesSentTo
(String address) Returns a list of mail messages sent to the given address, whether it was via To, Cc or Bcc.getMailsSentTo
(String address) Returns a list of mails sent to the given address, whether it was via To, Cc or Bcc.getMessagesSentTo
(String address) Returns a list of mails sent to the given address, whether it was via To, Cc or Bcc.int
Gets the total number of messages sent.(package private) io.smallrye.mutiny.Uni<Void>
-
Constructor Details
-
MockMailboxImpl
public MockMailboxImpl()
-
-
Method Details
-
send
-
getMessagesSentTo
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.
-
getMailsSentTo
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 interfaceMockMailbox
- Parameters:
address
- the email address we want to retrieve mail from- Returns:
- a list of mails sent to the given address, possibly empty.
-
getMailMessagesSentTo
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 interfaceMockMailbox
- 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 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.
-