Quantcast

[Issue 155] New - E-Mail sent date not being set

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Issue 155] New - E-Mail sent date not being set

smalherbe
https://hudson.dev.java.net/issues/show_bug.cgi?id=155
                 Issue #|155
                 Summary|E-Mail sent date not being set
               Component|hudson
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|www
             Assigned to|issues@hudson
             Reported by|smalherbe






------- Additional comments from [hidden email] Tue Nov 14 23:06:18 +0000 2006 -------
When I receive an e-mail notification from Hudson (sent to an Internet-based
e-mail address), the sent date is set to the start of the epoch (01/01/1970),
rather than the current date/time.

As a work-around, I made this change to a local Hudson build:

diff -c -4 -r1.3 Mailer.java
*** main/core/src/main/java/hudson/tasks/Mailer.java    7 Nov 2006 02:05:30
-0000       1.3
--- main/core/src/main/java/hudson/tasks/Mailer.java    14 Nov 2006 23:03:33 -0000
***************
*** 26,33 ****
--- 26,34 ----
  import java.io.IOException;
  import java.io.PrintWriter;
  import java.io.StringWriter;
  import java.util.ArrayList;
+ import java.util.Date;
  import java.util.HashSet;
  import java.util.List;
  import java.util.Map;
  import java.util.Properties;
***************
*** 223,230 ****
--- 224,232 ----
          // TODO: I'd like to put the URL to the page in here,
          // but how do I obtain that?
          msg.setContent("","text/plain");
          msg.setFrom(new InternetAddress(DESCRIPTOR.getAdminAddress()));
+         msg.setSentDate(new Date());

          List<InternetAddress> rcp = new ArrayList<InternetAddress>();
          StringTokenizer tokens = new StringTokenizer(recipients);
          while(tokens.hasMoreTokens())

Could this issue be addressed in a future release?

Thanks,

Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...