Class EmailAttachment

java.lang.Object
org.apache.commons.mail2.javax.EmailAttachment

public class EmailAttachment extends Object
This class models an email attachment. Used by MultiPartEmail.
Since:
1.0
  • Field Details

  • Constructor Details

  • Method Details

    • getDescription

      Gets the description.
      Returns:
      A String.
      Since:
      1.0
    • 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