Package io.quarkus.mailer
Class Attachment
java.lang.Object
io.quarkus.mailer.Attachment
Defines an attachment.
Instances of this class are not thread-safe.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAttachment(String name, byte[] data, String contentType) Creates a newAttachment.Attachment(String name, byte[] data, String contentType, String contentId) Creates a newAttachment.Attachment(String name, byte[] data, String contentType, String description, String disposition) Creates a newAttachment.Attachment(String name, File file, String contentType) Creates a newAttachment.Attachment(String name, File file, String contentType, String contentId) Creates a newAttachment.Attachment(String name, Flow.Publisher<Byte> data, String contentType) Creates a newAttachment.Attachment(String name, Flow.Publisher<Byte> data, String contentType, String contentId) Creates a newAttachment.Attachment(String name, Flow.Publisher<Byte> data, String contentType, String description, String disposition) Creates a newAttachment. -
Method Summary
Modifier and TypeMethodDescriptiongetData()getFile()getName()booleansetContentId(String contentId) setContentType(String contentType) setData(byte[] data) setData(Flow.Publisher<Byte> data) setDescription(String description) setDisposition(String disposition)
-
Field Details
-
DISPOSITION_INLINE
Disposition for inline attachments.- See Also:
-
DISPOSITION_ATTACHMENT
Disposition for attachments.- See Also:
-
-
Constructor Details
-
Attachment
Creates a newAttachment. Disposition is set toattachment.- Parameters:
name- the namefile- the filecontentType- the content type
-
Attachment
Creates a newAttachment. Disposition is set toinline.- Parameters:
name- the namefile- the filecontentType- the content typecontentId- the content id
-
Attachment
Creates a newAttachment. Disposition is set toattachment.- Parameters:
name- the namedata- the datacontentType- the content type
-
Attachment
Creates a newAttachment. Disposition is set toattachment.- Parameters:
name- the namedata- the data as a stream ofBytecontentType- the content type
-
Attachment
Creates a newAttachment. Disposition is set toinline.- Parameters:
name- the namedata- the datacontentType- the content typecontentId- the content id
-
Attachment
Creates a newAttachment. Disposition is set toinline.- Parameters:
name- the namedata- the data as a stream ofBytecontentType- the content typecontentId- the content id
-
Attachment
public Attachment(String name, byte[] data, String contentType, String description, String disposition) Creates a newAttachment.- Parameters:
name- the namedata- the datacontentType- the content typedescription- the descriptiondisposition- the disposition
-
Attachment
public Attachment(String name, Flow.Publisher<Byte> data, String contentType, String description, String disposition) Creates a newAttachment.- Parameters:
name- the namedata- the data as a stream ofBytecontentType- the content typedescription- the descriptiondisposition- the disposition
-
-
Method Details
-
getName
-
setName
-
getFile
-
setFile
-
getDescription
-
setDescription
-
getDisposition
-
setDisposition
-
getData
-
setData
-
setData
-
getContentType
-
setContentType
-
getContentId
-
setContentId
-
isInlineAttachment
public boolean isInlineAttachment()- Returns:
trueif the disposition is set toinline.
-