You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2015/04/23 11:07:30 UTC

svn commit: r1675561 - /commons/proper/email/trunk/src/site/xdoc/userguide.xml

Author: tn
Date: Thu Apr 23 09:07:30 2015
New Revision: 1675561

URL: http://svn.apache.org/r1675561
Log:
Update ImageHtmlEmail example of userguide.

Modified:
    commons/proper/email/trunk/src/site/xdoc/userguide.xml

Modified: commons/proper/email/trunk/src/site/xdoc/userguide.xml
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/site/xdoc/userguide.xml?rev=1675561&r1=1675560&r2=1675561&view=diff
==============================================================================
--- commons/proper/email/trunk/src/site/xdoc/userguide.xml (original)
+++ commons/proper/email/trunk/src/site/xdoc/userguide.xml Thu Apr 23 09:07:30 2015
@@ -188,14 +188,14 @@ import org.apache.commons.mail.HtmlEmail
 ...
 
   // load your HTML email template
-  String htmlEmailTemplate = ....
+  String htmlEmailTemplate = ".... <img src=\"http://www.apache.org/images/feather.gif\"> ....";
 
   // define you base URL to resolve relative resource locations
   URL url = new URL("http://www.apache.org");
 
   // create the email message
-  HtmlEmail email = new ImageHtmlEmail();
-  email.setDataSourceResolver(new DataSourceResolverImpl(url));
+  ImageHtmlEmail email = new ImageHtmlEmail();
+  email.setDataSourceResolver(new DataSourceUrlResolver(url));
   email.setHostName("mail.myserver.com");
   email.addTo("jdoe@somewhere.org", "John Doe");
   email.setFrom("me@apache.org", "Me");
@@ -212,8 +212,8 @@ import org.apache.commons.mail.HtmlEmail
   ]]></source>        
       <p>
         First we create a HTML email template referencing some images. All  
-        referenced images are automatically transformed to inline images
-        starting from the current working directory.  
+        referenced images are automatically transformed to inline images by
+        the specified DataSourceResolver.
       </p>
     </section>  
     <section name="Debugging">