Package org.apache.commons.mail
Class EmailAttachment
- java.lang.Object
-
- org.apache.commons.mail.EmailAttachment
-
public class EmailAttachment extends java.lang.Object
This class models an email attachment. Used byMultiPartEmail.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTACHMENTDefinition of the part being an attachment.static java.lang.StringINLINEDefinition of the part being inline.
-
Constructor Summary
Constructors Constructor Description EmailAttachment()Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()Gets the description.java.lang.StringgetDisposition()Gets the disposition.java.lang.StringgetName()Gets the name.java.lang.StringgetPath()Gets the path.java.net.URLgetURL()Gets the URL.voidsetDescription(java.lang.String desc)Sets the description.voidsetDisposition(java.lang.String aDisposition)Sets the disposition.voidsetName(java.lang.String aName)Sets the name.voidsetPath(java.lang.String aPath)Sets the path to the attachment.voidsetURL(java.net.URL aUrl)Sets the URL.
-
-
-
Field Detail
-
ATTACHMENT
public static final java.lang.String ATTACHMENT
Definition of the part being an attachment.- See Also:
- Constant Field Values
-
INLINE
public static final java.lang.String INLINE
Definition of the part being inline.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EmailAttachment
public EmailAttachment()
Constructs a new instance.
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Gets the description.- Returns:
- A String.
- Since:
- 1.0
-
getDisposition
public java.lang.String getDisposition()
Gets the disposition.- Returns:
- A String.
- Since:
- 1.0
-
getName
public java.lang.String getName()
Gets the name.- Returns:
- A String.
- Since:
- 1.0
-
getPath
public java.lang.String getPath()
Gets the path.- Returns:
- A String.
- Since:
- 1.0
-
getURL
public java.net.URL getURL()
Gets the URL.- Returns:
- A URL.
- Since:
- 1.0
-
setDescription
public void setDescription(java.lang.String desc)
Sets the description.- Parameters:
desc- A String.- Since:
- 1.0
-
setDisposition
public void setDisposition(java.lang.String aDisposition)
Sets the disposition.- Parameters:
aDisposition- A String.- Since:
- 1.0
-
setName
public void setName(java.lang.String aName)
Sets the name.- Parameters:
aName- A String.- Since:
- 1.0
-
setPath
public void setPath(java.lang.String aPath)
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
public void setURL(java.net.URL aUrl)
Sets the URL.- Parameters:
aUrl- A URL.- Since:
- 1.0
-
-