Class MimeBodyPartReference


  • public final class MimeBodyPartReference
    extends Object
    A reference to a designated MIME body part and an RFC 2392 compliant way to locate it within the HTML body part the same email.
    Since:
    5.4
    • Constructor Detail

      • MimeBodyPartReference

        public MimeBodyPartReference​(javax.activation.DataSource source)
    • Method Detail

      • getLocator

        public URI getLocator()
        Locates the designated body part within the HTML body part of an email.

        This locator will use the cid: URL scheme as defined in RFC 2392. It's meant to be used within the src attribute of img tags within the HTML body part of the same email.

         
         <img src=\"" + myMimeBodyPartReference.getLocator().toExternalForm() + "\"/>
         
         
        Returns:
        locates the designated body part within the HTML
      • getSource

        public javax.activation.DataSource getSource()
        Returns:
        a DataSource encapsulating the access to the image data