Author: sgoeschl
Date: Mon Oct 10 05:53:07 2005
New Revision: 312634

URL: http://svn.apache.org/viewcvs?rev=312634&view=rev
Log:
+) Changed the signature of TemplateHtmlEmail.send() since it inherits from 
Mail.send(). The method now throws an EmailException instead of 
MessagingException which might break existing code              
+) Upgrading to javamail-1.3.2
+) Upgrading to commons-email-1.0

Modified:
    jakarta/turbine/fulcrum/trunk/template/project.xml
    
jakarta/turbine/fulcrum/trunk/template/src/java/org/apache/fulcrum/template/TemplateHtmlEmail.java
    jakarta/turbine/fulcrum/trunk/template/xdocs/changes.xml

Modified: jakarta/turbine/fulcrum/trunk/template/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/turbine/fulcrum/trunk/template/project.xml?rev=312634&r1=312633&r2=312634&view=diff
==============================================================================
--- jakarta/turbine/fulcrum/trunk/template/project.xml (original)
+++ jakarta/turbine/fulcrum/trunk/template/project.xml Mon Oct 10 05:53:07 2005
@@ -4,41 +4,38 @@
   <id>fulcrum-template</id>
   <name>Fulcrum Template Component</name>
   <currentVersion>1.0.2-dev</currentVersion>
-
   <dependencies>
-     <dependency>
+    <dependency>
       <groupId>commons-configuration</groupId>
       <artifactId>commons-configuration</artifactId>
       <version>1.0</version>
       <url>http://jakarta.apache.org/commons/configuration</url>
-    </dependency>     
-     <dependency>
+    </dependency>
+    <dependency>
       <groupId>commons-collections</groupId>
       <artifactId>commons-collections</artifactId>
       <version>3.1</version>
       <url>http://jakarta.apache.org/commons/collections</url>
-    </dependency>     
+    </dependency>
     <dependency>
       <groupId>commons-email</groupId>
       <artifactId>commons-email</artifactId>
-      <version>20030310.165926</version>
-      <url>http://jakarta.apache.org/commons/sandbox/email</url>
+      <version>1.0</version>
+      <url>http://jakarta.apache.org/commons/email.html</url>
+      <properties/>
     </dependency>
-    
     <dependency>
       <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>
       <version>2.0</version>
       <url>http://jakarta.apache.org/commons/sandbox/email</url>
     </dependency>
-    
     <dependency>
       <groupId>velocity</groupId>
       <artifactId>velocity</artifactId>
       <version>1.4</version>
       <url>http://jakarta.apache.org/velocity</url>
     </dependency>
-      
     <dependency>
       <groupId>jaf</groupId>
       <artifactId>activation</artifactId>
@@ -48,26 +45,19 @@
     <dependency>
       <groupId>javamail</groupId>
       <artifactId>javamail</artifactId>
-      <version>1.3.1</version>
+      <version>1.3.2</version>
       <url>http://java.sun.com/products/javamail/</url>
     </dependency>
-        
     <!--  Needed only for testing -->
     <dependency>
       <groupId>fulcrum</groupId>
       <artifactId>fulcrum-testcontainer</artifactId>
       <version>1.0.5</version>
     </dependency>
-    
     <dependency>
       <groupId>fulcrum</groupId>
       <artifactId>fulcrum-yaafi</artifactId>
       <version>1.0.4</version>
-    </dependency>  
-
-
+    </dependency>
   </dependencies>
-
-
 </project>
-

Modified: 
jakarta/turbine/fulcrum/trunk/template/src/java/org/apache/fulcrum/template/TemplateHtmlEmail.java
URL: 
http://svn.apache.org/viewcvs/jakarta/turbine/fulcrum/trunk/template/src/java/org/apache/fulcrum/template/TemplateHtmlEmail.java?rev=312634&r1=312633&r2=312634&view=diff
==============================================================================
--- 
jakarta/turbine/fulcrum/trunk/template/src/java/org/apache/fulcrum/template/TemplateHtmlEmail.java
 (original)
+++ 
jakarta/turbine/fulcrum/trunk/template/src/java/org/apache/fulcrum/template/TemplateHtmlEmail.java
 Mon Oct 10 05:53:07 2005
@@ -22,6 +22,7 @@
 import java.util.Hashtable;
 import javax.mail.MessagingException;
 
+import org.apache.commons.mail.EmailException;
 import org.apache.commons.mail.HtmlEmail;
 
 /**
@@ -126,10 +127,11 @@
     /**
      * Actually send the mail.
      *
-     * @exception MessagingException.
+     * @return the message id of the sent email
+     * @exception EmailException the sending of the message failed
      */
-    public void send()
-        throws MessagingException
+    public String send()
+        throws EmailException
     {
         context.put("mail",this);
 
@@ -153,13 +155,13 @@
         }
         catch( Exception e)
         {
-            throw new MessagingException("Cannot parse template", e);
+            throw new EmailException("Cannot parse template", e);
         }
 
         setHtmlMsg(htmlbody);
         setTextMsg(textbody);
 
-        super.send();
+        return super.send();
     }
 
     /**

Modified: jakarta/turbine/fulcrum/trunk/template/xdocs/changes.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/turbine/fulcrum/trunk/template/xdocs/changes.xml?rev=312634&r1=312633&r2=312634&view=diff
==============================================================================
--- jakarta/turbine/fulcrum/trunk/template/xdocs/changes.xml (original)
+++ jakarta/turbine/fulcrum/trunk/template/xdocs/changes.xml Mon Oct 10 
05:53:07 2005
@@ -6,7 +6,15 @@
   </properties>
 
   <body>
-    <release version="1.0-alpha-2" date="in CVS">
+    <release version="1.0-alpha-2" date="in SVN">
+     <action dev="sgoeschl" type="update">
+        Changed the signature of TemplateHtmlEmail.send() since it inherits
+        from Mail.send(). The method now throws an EmailException instead
+        of MessagingException which might break existing code.
+      </action>                  
+     <action dev="sgoeschl" type="update">
+        Upgrading to javamail-1.3.2 and commons-email-1.0
+      </action>                  
      <action dev="epugh" type="add">
         Fix EmailTemplate and HtmlEmailTemplate by providing a templateService
         that can be manually passed in.  Should be avalon components instead.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to