Class Attachment

java.lang.Object
com.priint.pubserverapi.mail.Attachment

public class Attachment extends Object
Represents an email attachment, including metadata such as MIME type, display name, and whether it should be rendered inline.
  • Constructor Details

    • Attachment

      public Attachment(Path path, AttachmentMimeType mimeType)
      Constructs an attachment with default file name and inline flag.
      Parameters:
      path - the file to attach.
      mimeType - the MIME type of the attachment.
    • Attachment

      public Attachment(Path path, AttachmentMimeType mimeType, boolean inline)
      Constructs a fully configured attachment.
      Parameters:
      path - the file to attach.
      mimeType - the MIME type of the attachment.
      inline - true if the attachment should be displayed inline; false otherwise.
  • Method Details

    • getPath

      public Path getPath()
      Returns the attached path to file.
      Returns:
      the path.
    • getMimeType

      public AttachmentMimeType getMimeType()
      Returns the MIME type of the attachment.
      Returns:
      the MIME type.
    • isInline

      public boolean isInline()
      Indicates whether the attachment should be rendered inline in the email.
      Returns:
      true if inline, false otherwise.