org.apache.commons.mail
Class ImageHtmlEmail

java.lang.Object
  extended by org.apache.commons.mail.Email
      extended by org.apache.commons.mail.MultiPartEmail
          extended by org.apache.commons.mail.HtmlEmail
              extended by org.apache.commons.mail.ImageHtmlEmail

public class ImageHtmlEmail
extends HtmlEmail

Small wrapper class on top of HtmlEmail which encapsulates the required logic to retrieve images that are contained in "<img src=../>" elements in the HTML code. This is done by replacing all img-src-elements with "cid:"-entries and embedding images in the email.
For local files the class tries to either load them via an absolute path or - if available - use a relative path starting from a base directory. For files that are not found locally, the implementation tries to download the element and link it in.
The image loading is done by an instance of DataSourceResolver which has to be provided by the caller.

Since:
1.3
Version:
$Id: ImageHtmlEmail.java 1420381 2012-12-11 20:18:05Z tn $

Field Summary
static String REGEX_IMG_SRC
          regexp for extracting tags
static String REGEX_SCRIPT_SRC
          regexp for extracting

Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.