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

      @Creator public Attachment(@NonNull @NonNull String filename, @NonNull @NonNull String contentType, @NonNull @io.micronaut.core.annotation.NonNull byte[] content, @Nullable @Nullable String id, @Nullable @Nullable String disposition)
      Parameters:
      filename - filename to show up in email
      content - file content
      contentType - file content type
      id - content identifier
      disposition - content disposition
      Since:
      2.1.0
    • Attachment

      @Deprecated(since="2.1.0", forRemoval=true) public Attachment(@NonNull @NonNull String filename, @NonNull @NonNull String contentType, @NonNull @io.micronaut.core.annotation.NonNull byte[] content, @Nullable @Nullable String id)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      filename - filename to show up in email
      content - file content
      contentType - file content type
      id - content identifier
  • Method Details

    • builder

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

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

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

      @NonNull public @io.micronaut.core.annotation.NonNull byte[] getContent()
      Returns:
      file content type
    • getId

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

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