You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by dl...@apache.org on 2001/09/07 19:20:30 UTC

cvs commit: jakarta-turbine-2/src/java/org/apache/turbine/util/mail Email.java

dlr         01/09/07 10:20:30

  Modified:    src/java/org/apache/turbine/util/mail Email.java
  Log:
  Subject and sent date should probalby not have to be set (spurred by
  discussion on turbine-user, already fixed in v3).
  
  Revision  Changes    Path
  1.2       +14 -8     jakarta-turbine-2/src/java/org/apache/turbine/util/mail/Email.java
  
  Index: Email.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/util/mail/Email.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- Email.java	2001/08/16 05:09:55	1.1
  +++ Email.java	2001/09/07 17:20:30	1.2
  @@ -82,7 +82,7 @@
    * @author <a href="mailto:bmclaugh@algx.net">Brett McLaughlin</a>
    * @author <a href="mailto:greg@shwoop.com">Greg Ritter</a>
    * @author <a href="mailto:unknown">Regis Koenig</a>
  - * @version $Id: Email.java,v 1.1 2001/08/16 05:09:55 jvanzyl Exp $
  + * @version $Id: Email.java,v 1.2 2001/09/07 17:20:30 dlr Exp $
    */
   public abstract class Email
   {
  @@ -373,13 +373,16 @@
       public Email setSubject( String subject )
           throws MessagingException
       {
  -        if ( charset != null )
  +        if (subject != null)
           {
  -            message.setSubject(subject, charset);
  -        }
  -        else
  -        {
  -            message.setSubject(subject);
  +            if ( charset != null )
  +            {
  +                message.setSubject(subject, charset);
  +            }
  +            else
  +            {
  +                message.setSubject(subject);
  +            }
           }
           return this;
       }
  @@ -394,7 +397,10 @@
       public Email setSentDate( Date date )
           throws MessagingException
       {
  -        message.setSentDate( date );
  +        if (date != null)
  +        {
  +            message.setSentDate( date );
  +        }
           return this;
       }
   
  
  
  

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