Class Attachment

java.lang.Object
io.micronaut.email.Attachment

@Introspected public class Attachment extends Object
Email's Attachment.
Since:
1.0.0
Author:
Sergio del Amo
  • Constructor Details

    • Attachment

      public Attachment(@NonNull String filename, @NonNull String contentType, @org.jspecify.annotations.NonNull byte[] content, @Nullable String id, @Nullable String disposition)
      Parameters:
      filename - filename to show up in email
      contentType - file content type
      content - file content
      id - content identifier
      disposition - content disposition
      Since:
      2.1.0
  • Method Details

    • builder

      public static @NonNull Attachment.Builder builder()
      Returns:
      Attachment's builder
    • getFilename

      public @NonNull String getFilename()
      Returns:
      filename to show up in email
    • getContentType

      public @NonNull String getContentType()
      Returns:
      file content type
    • getContent

      public @org.jspecify.annotations.NonNull byte[] getContent()
      Returns:
      file content type
    • getId

      public @Nullable String getId()
      Returns:
      Content Id
    • getDisposition

      public @Nullable String getDisposition()
      Returns:
      Content Disposition
      Since:
      2.1.0