Package io.mailtrap.api.inbound
Interface InboundMessages
- All Known Implementing Classes:
InboundMessagesImpl
public interface InboundMessages
Interface representing the Mailtrap Inbound Email API for received messages.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDelete a message.forward(long inboxId, String messageId, InboundForwardRequest request) Forward a message to new recipients (at least onetois required).Get a single message with its body and attachment download URLs.List received messages in an inbox.reply(long inboxId, String messageId, InboundReplyRequest request) Reply to a message (to the original sender).replyAll(long inboxId, String messageId, InboundReplyRequest request) Reply to a message and copy the original's other recipients.
-
Method Details
-
list
List received messages in an inbox.- Parameters:
inboxId- the inbox IDlastId- pagination cursor from a previous response (nullfor the first page)- Returns:
- a page of messages
-
get
Get a single message with its body and attachment download URLs.- Parameters:
inboxId- the inbox IDmessageId- the message ID- Returns:
- the message
-
delete
Delete a message.- Parameters:
inboxId- the inbox IDmessageId- the message ID
-
reply
Reply to a message (to the original sender). Sends a real email.- Parameters:
inboxId- the inbox IDmessageId- the message IDrequest- the reply body- Returns:
- the send result
-
replyAll
Reply to a message and copy the original's other recipients. Sends a real email.- Parameters:
inboxId- the inbox IDmessageId- the message IDrequest- the reply body- Returns:
- the send result
-
forward
Forward a message to new recipients (at least onetois required). Sends a real email.- Parameters:
inboxId- the inbox IDmessageId- the message IDrequest- the forward body- Returns:
- the send result
-