commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r385399 - /jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java
Date Mon, 13 Mar 2006 01:13:08 GMT
Author: dion
Date: Sun Mar 12 17:13:06 2006
New Revision: 385399

URL: http://svn.apache.org/viewcvs?rev=385399&view=rev
Log:
Bug 38944: add add Email.setReplyTo( java.util.Collection aCollection )

Modified:
    jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java

Modified: jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java?rev=385399&r1=385398&r2=385399&view=diff
==============================================================================
--- jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java (original)
+++ jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java Sun Mar
12 17:13:06 2006
@@ -704,6 +704,24 @@
         return this;
     }
 
+    /**
+     * Set a list of reply addresses
+     *
+     * @param   aCollection collection of InternetAddress objects
+     * @return  An Email.
+     * @throws EmailException Indicates an invalid email address
+     * @since 1.1
+     */
+    public Email setReplyTo(Collection aCollection) throws EmailException
+    {
+        if (aCollection == null || aCollection.isEmpty())
+        {
+            throw new EmailException("Address List provided was invalid");
+        }
+
+        this.replyList = new ArrayList(aCollection);
+        return this;
+    }
 
     /**
      * Used to specify the mail headers.  Example:



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message