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 and Description
    --- | ---
    `static String` | `ATTACHMENT` Definition of the part being an attachment.
    `static String` | `INLINE` Definition of the part being inline.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EmailAttachment()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDescription()` Get the description.
    `String` | `getDisposition()` Get the disposition.
    `String` | `getName()` Get the name.
    `String` | `getPath()` Get the path.
    `URL` | `getURL()` Get the URL.
    `void` | `setDescription(String desc)` Set the description.
    `void` | `setDisposition(String aDisposition)` Set the disposition.
    `void` | `setName(String aName)` Set the name.
    `void` | `setPath(String aPath)` Set the path to the attachment.
    `void` | `setURL(URL aUrl)` Set the URL.

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

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

- - ### Field Detail

    - #### 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 Detail

    - #### EmailAttachment

          public EmailAttachment()

  - ### Method Detail

    - #### getDescription

          public String getDescription()

      Get the description.
      Returns:
        A String.
      Since:
        1.0

    - #### getName

          public String getName()

      Get the name.
      Returns:
        A String.
      Since:
        1.0

    - #### getPath

          public String getPath()

      Get the path.
      Returns:
        A String.
      Since:
        1.0

    - #### getURL

          public URL getURL()

      Get the URL.
      Returns:
        A URL.
      Since:
        1.0

    - #### getDisposition

          public String getDisposition()

      Get the disposition.
      Returns:
        A String.
      Since:
        1.0

    - #### setDescription

          public void setDescription(String desc)

      Set the description.
      Parameters:
        `desc` - A String.
      Since:
        1.0

    - #### setName

          public void setName(String aName)

      Set the name.
      Parameters:
        `aName` - A String.
      Since:
        1.0

    - #### setPath

          public void setPath(String aPath)

      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

          public void setURL(URL aUrl)

      Set the URL.
      Parameters:
        `aUrl` - A URL.
      Since:
        1.0

    - #### setDisposition

          public void setDisposition(String aDisposition)

      Set the disposition.
      Parameters:
        `aDisposition` - A String.
      Since:
        1.0

Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.