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
-
Constructor Summary
ConstructorDescriptionAttachment
(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()
boolean
setContentId
(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 ofByte
contentType
- 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 ofByte
contentType
- 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 ofByte
contentType
- 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:
true
if the disposition is set toinline
.
-