Class Attachment

java.lang.Object
io.quarkus.mailer.Attachment

public class Attachment extends Object
Defines an attachment.

Instances of this class are not thread-safe.

  • Field Details

    • DISPOSITION_INLINE

      public static final String DISPOSITION_INLINE
      Disposition for inline attachments.
      See Also:
    • DISPOSITION_ATTACHMENT

      public static final String DISPOSITION_ATTACHMENT
      Disposition for attachments.
      See Also:
  • Constructor Details

    • Attachment

      public Attachment(String name, File file, String contentType)
      Creates a new Attachment. Disposition is set to attachment.
      Parameters:
      name - the name
      file - the file
      contentType - the content type
    • Attachment

      public Attachment(String name, File file, String contentType, String contentId)
      Creates a new Attachment. Disposition is set to inline.
      Parameters:
      name - the name
      file - the file
      contentType - the content type
      contentId - the content id
    • Attachment

      public Attachment(String name, byte[] data, String contentType)
      Creates a new Attachment. Disposition is set to attachment.
      Parameters:
      name - the name
      data - the data
      contentType - the content type
    • Attachment

      public Attachment(String name, Flow.Publisher<Byte> data, String contentType)
      Creates a new Attachment. Disposition is set to attachment.
      Parameters:
      name - the name
      data - the data as a stream of Byte
      contentType - the content type
    • Attachment

      public Attachment(String name, byte[] data, String contentType, String contentId)
      Creates a new Attachment. Disposition is set to inline.
      Parameters:
      name - the name
      data - the data
      contentType - the content type
      contentId - the content id
    • Attachment

      public Attachment(String name, Flow.Publisher<Byte> data, String contentType, String contentId)
      Creates a new Attachment. Disposition is set to inline.
      Parameters:
      name - the name
      data - the data as a stream of Byte
      contentType - the content type
      contentId - the content id
    • Attachment

      public Attachment(String name, byte[] data, String contentType, String description, String disposition)
      Creates a new Attachment.
      Parameters:
      name - the name
      data - the data
      contentType - the content type
      description - the description
      disposition - the disposition
    • Attachment

      public Attachment(String name, Flow.Publisher<Byte> data, String contentType, String description, String disposition)
      Creates a new Attachment.
      Parameters:
      name - the name
      data - the data as a stream of Byte
      contentType - the content type
      description - the description
      disposition - the disposition
  • Method Details