Package org.apache.commons.mail
Class EmailAttachment
java.lang.Object
org.apache.commons.mail.EmailAttachment
This class models an email attachment. Used by MultiPartEmail.
- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the description.Get the disposition.getName()
Get the name.getPath()
Get the path.getURL()
Get the URL.void
setDescription
(String desc) Set the description.void
setDisposition
(String aDisposition) Set the disposition.void
Set the name.void
Set the path to the attachment.void
Set 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()
-
-
Method Details
-
getDescription
Get the description.- Returns:
- A String.
- Since:
- 1.0
-
getName
Get the name.- Returns:
- A String.
- Since:
- 1.0
-
getPath
Get the path.- Returns:
- A String.
- Since:
- 1.0
-
getURL
Get the URL.- Returns:
- A URL.
- Since:
- 1.0
-
getDisposition
Get the disposition.- Returns:
- A String.
- Since:
- 1.0
-
setDescription
Set the description.- Parameters:
desc
- A String.- Since:
- 1.0
-
setName
Set the name.- Parameters:
aName
- A String.- Since:
- 1.0
-
setPath
Set the path to the attachment. The path can be absolute or relative and should include the filename.Example: /home/user/images/image.jpg
Example: images/image.jpg- Parameters:
aPath
- A String.- Since:
- 1.0
-
setURL
Set the URL.- Parameters:
aUrl
- A URL.- Since:
- 1.0
-
setDisposition
Set the disposition.- Parameters:
aDisposition
- A String.- Since:
- 1.0
-