Interface MailImageInliner

All Known Implementing Classes:
MailImageInlinerImpl

@ExperimentalApi @InjectableComponent @ParametersAreNonnullByDefault public interface MailImageInliner
A component to use when required to construct an email body from HTML that may contain inlined images.
Since:
v7.0
  • Method Details

    • inlineImages

      @Nonnull MailImageInliner.InlinedEmailBody inlineImages(String html)
      Tries to inline all the images specified by an IMG tag. Replaces the image url with the cid link or unchanged path if specified path cannot be added as attachment. Will then build the related body parts for the attachments.

      NB: This method will be able to inline system images contained within provided HTML, however will not inline user attachments. See inlineImages(String, Issue) in order to inline attachments related to an issue.

      Parameters:
      html - HTML to change.
      Returns:
      The MailImageInliner.InlinedEmailBody to represent the new email body, fully inlined
    • inlineImages

      @Nonnull MailImageInliner.InlinedEmailBody inlineImages(String html, Issue issue)
      Tries to inline all the images specified by an IMG tag. Replaces the image url with the cid link or unchanged path if specified path cannot be added as attachment. Will then build the related body parts for the attachments.

      NB: This method will inline system images as well as attachments related to issue Issue.getAttachments() that are contained within the provided html.

      Parameters:
      html - HTML to change.
      issue - Issue that is related to HTML that contains required attachments
      Returns:
      The MailImageInliner.InlinedEmailBody to represent the new email body, fully inlined
      Since:
      v7.0.5