Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-155

E-Mail sent date not being set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      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

            Unassigned Unassigned
            smalherbe smalherbe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: