Package org.apache.commons.mail2.jakarta
Class EmailAttachment
java.lang.Object
org.apache.commons.mail2.jakarta.EmailAttachment
This class models an email attachment. Used by
MultiPartEmail
.- Since:
- 1.0
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the description.Gets the disposition.getName()
Gets the name.getPath()
Gets the path.getURL()
Gets the URL.void
setDescription
(String desc) Sets the description.void
setDisposition
(String aDisposition) Sets the disposition.void
Sets the name.void
Sets the path to the attachment.void
Sets the URL.
-
Field Details
-
ATTACHMENT
Definition of the part being an attachment.- See Also:
-
INLINE
Definition of the part being inline.- See Also:
-
-
Constructor Details
-
EmailAttachment
public EmailAttachment()Constructs a new instance.
-
-
Method Details
-
getDescription
Gets the description.- Returns:
- A String.
- Since:
- 1.0
-
getDisposition
Gets the disposition.- Returns:
- A String.
- Since:
- 1.0
-
getName
Gets the name.- Returns:
- A String.
- Since:
- 1.0
-
getPath
Gets the path.- Returns:
- A String.
- Since:
- 1.0
-
getURL
Gets the URL.- Returns:
- A URL.
- Since:
- 1.0
-
setDescription
Sets the description.- Parameters:
desc
- A String.- Since:
- 1.0
-
setDisposition
Sets the disposition.- Parameters:
aDisposition
- A String.- Since:
- 1.0
-
setName
Sets the name.- Parameters:
aName
- A String.- Since:
- 1.0
-
setPath
Sets the path to the attachment. The path can be absolute or relative and should include the file name.Example: /home/user/images/image.jpg
Example: images/image.jpg- Parameters:
aPath
- A String.- Since:
- 1.0
-
setURL
Sets the URL.- Parameters:
aUrl
- A URL.- Since:
- 1.0
-