Interface InboundMessages

All Known Implementing Classes:
InboundMessagesImpl

public interface InboundMessages
Interface representing the Mailtrap Inbound Email API for received messages.
  • Method Details

    • list

      InboundMessagesListResponse list(long inboxId, String lastId)
      List received messages in an inbox.
      Parameters:
      inboxId - the inbox ID
      lastId - pagination cursor from a previous response (null for the first page)
      Returns:
      a page of messages
    • get

      InboundMessage get(long inboxId, String messageId)
      Get a single message with its body and attachment download URLs.
      Parameters:
      inboxId - the inbox ID
      messageId - the message ID
      Returns:
      the message
    • delete

      void delete(long inboxId, String messageId)
      Delete a message.
      Parameters:
      inboxId - the inbox ID
      messageId - the message ID
    • reply

      InboundSendResult reply(long inboxId, String messageId, InboundReplyRequest request)
      Reply to a message (to the original sender). Sends a real email.
      Parameters:
      inboxId - the inbox ID
      messageId - the message ID
      request - the reply body
      Returns:
      the send result
    • replyAll

      InboundSendResult replyAll(long inboxId, String messageId, InboundReplyRequest request)
      Reply to a message and copy the original's other recipients. Sends a real email.
      Parameters:
      inboxId - the inbox ID
      messageId - the message ID
      request - the reply body
      Returns:
      the send result
    • forward

      InboundSendResult forward(long inboxId, String messageId, InboundForwardRequest request)
      Forward a message to new recipients (at least one to is required). Sends a real email.
      Parameters:
      inboxId - the inbox ID
      messageId - the message ID
      request - the forward body
      Returns:
      the send result