ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/email MimeMailer.java PlainMailer.java
Date Tue, 23 Apr 2002 20:42:58 GMT
ehatcher    02/04/23 13:42:58

  Modified:    src/main/org/apache/tools/ant/taskdefs/email MimeMailer.java
                        PlainMailer.java
  Log:
  add date header.  patch from PR #7851 by Kevin Grey
  
  Revision  Changes    Path
  1.6       +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/email/MimeMailer.java
  
  Index: MimeMailer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/email/MimeMailer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MimeMailer.java	14 Apr 2002 11:16:15 -0000	1.5
  +++ MimeMailer.java	23 Apr 2002 20:42:58 -0000	1.6
  @@ -61,6 +61,7 @@
   import java.util.Enumeration;
   import java.util.Properties;
   import java.util.Vector;
  +import java.util.Date;
   import javax.activation.DataHandler;
   import javax.activation.FileDataSource;
   import javax.mail.Message;
  @@ -116,6 +117,7 @@
               if (subject != null) {
                   msg.setSubject(subject);
               }
  +            msg.addHeader("Date", (new Date()).toString());
   
               ByteArrayOutputStream baos = new ByteArrayOutputStream();
               PrintStream out = new PrintStream(baos);
  
  
  
  1.5       +3 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/email/PlainMailer.java
  
  Index: PlainMailer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/email/PlainMailer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PlainMailer.java	14 Apr 2002 11:16:15 -0000	1.4
  +++ PlainMailer.java	23 Apr 2002 20:42:58 -0000	1.5
  @@ -59,6 +59,8 @@
   import java.io.IOException;
   import java.io.PrintStream;
   import java.util.Enumeration;
  +import java.util.Date;
  +
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.mail.MailMessage;
   
  @@ -103,6 +105,7 @@
                   mailMessage.setSubject(subject);
               }
   
  +            mailMessage.setHeader("Date", (new Date()).toString());
               mailMessage.setHeader("Content-Type", message.getMimeType());
   
               PrintStream out = mailMessage.getPrintStream();
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message