Package com.mailosaur

Class Files

java.lang.Object
com.mailosaur.Files

public class Files extends Object
File operations.
  • Constructor Details

  • Method Details

    • getAttachment

      public byte[] getAttachment(String attachmentId) throws MailosaurException, IOException
      Downloads a single attachment.
      Parameters:
      attachmentId - The identifier for the required attachment.
      Returns:
      The byte array if successful.
      Throws:
      MailosaurException - Thrown if Mailosaur responds with an error.
      IOException - Unexpected exception.
    • getEmail

      public byte[] getEmail(String messageId) throws MailosaurException, IOException
      Downloads an EML file representing the specified email.
      Parameters:
      messageId - The identifier for the required message.
      Returns:
      The byte array if successful.
      Throws:
      MailosaurException - Thrown if Mailosaur responds with an error.
      IOException - Unexpected exception.
    • getPreview

      public byte[] getPreview(String previewId) throws MailosaurException, IOException
      Downloads a screenshot of your email rendered in a real email client. Simply supply the unique identifier for the required preview.
      Parameters:
      previewId - The identifier of the email preview to be downloaded.
      Returns:
      The byte array if successful.
      Throws:
      MailosaurException - Thrown if Mailosaur responds with an error.
      IOException - Unexpected exception.