Package org.apache.commons.mail

# Class EmailAttachment

java.lang.Object
org.apache.commons.mail.EmailAttachment

public class EmailAttachment extends Object
This class models an email attachment. Used by `MultiPartEmail`.

Since:
  1.0

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ATTACHMENT`
  Definition of the part being an attachment.
  `static final String`
  `INLINE`
  Definition of the part being inline.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EmailAttachment()`
  Constructs a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDescription()`
  Gets the description.
  `String`
  `getDisposition()`
  Gets the disposition.
  `String`
  `getName()`
  Gets the name.
  `String`
  `getPath()`
  Gets the path.
  `URL`
  `getURL()`
  Gets the URL.
  `void`
  `setDescription(String desc)`
  Sets the description.
  `void`
  `setDisposition(String aDisposition)`
  Sets the disposition.
  `void`
  `setName(String aName)`
  Sets the name.
  `void`
  `setPath(String aPath)`
  Sets the path to the attachment.
  `void`
  `setURL(URL aUrl)`
  Sets the URL.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### ATTACHMENT

    public static final String ATTACHMENT
    Definition of the part being an attachment.
    See Also:
      - Constant Field Values

  - ### INLINE

    public static final String INLINE
    Definition of the part being inline.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### EmailAttachment

    public EmailAttachment()
    Constructs a new instance.

- ## Method Details

  - ### getDescription

    public String getDescription()
    Gets the description.
    Returns:
      A String.
    Since:
      1.0

  - ### getDisposition

    public String getDisposition()
    Gets the disposition.
    Returns:
      A String.
    Since:
      1.0

  - ### getName

    public String getName()
    Gets the name.
    Returns:
      A String.
    Since:
      1.0

  - ### getPath

    public String getPath()
    Gets the path.
    Returns:
      A String.
    Since:
      1.0

  - ### getURL

    public URL getURL()
    Gets the URL.
    Returns:
      A URL.
    Since:
      1.0

  - ### setDescription

    public void setDescription(String desc)
    Sets the description.
    Parameters:
      `desc` - A String.
    Since:
      1.0

  - ### setDisposition

    public void setDisposition(String aDisposition)
    Sets the disposition.
    Parameters:
      `aDisposition` - A String.
    Since:
      1.0

  - ### setName

    public void setName(String aName)
    Sets the name.
    Parameters:
      `aName` - A String.
    Since:
      1.0

  - ### setPath

    public void setPath(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(URL aUrl)
    Sets the URL.
    Parameters:
      `aUrl` - A URL.
    Since:
      1.0