• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • mailer-plugin
    • jenkins 2.19.3
      Mailer plugin 1.18
    • 1.26

      when catching a build failure and sending an email via:

      catch (err) {
          node ('Client-Slave'){
              echo "Failed: ${err}"
              currentBuild.result = 'FAILURE'
              step([$class: 'Mailer', recipients: 'example@example.com, recipient2@example.com'])
          }
      }
      

      the mail is send as:

      [...]
      X-Jenkins-Job: example_pipeline
      X-Jenkins-Result: FAILURE
      
      https://jenkins.example.com/blue/organizations/jenkins/example_pipeline/detail/example_pipeline/21/------------------------------------------
      [...truncated 25 lines...]
      [...]
      

      it would be better to send it with a line break after the url, as the ----- are treated as part of the url by some mail clients:

      [...]
      X-Jenkins-Job: example_pipeline
      X-Jenkins-Result: FAILURE
      
      https://jenkins.example.com/blue/organizations/jenkins/example_pipeline/detail/example_pipeline/21/
      ------------------------------------------
      [...truncated 25 lines...]
      [...]
      

          [JENKINS-39976] pipeline build failed mail - missing line break

          Roman Pickl created issue -
          Jesse Glick made changes -
          Component/s Original: pipeline [ 21692 ]
          Description Original: when catching a build failure and sending an email via:

          catch (err) {
              node ('Client-Slave'){
                  echo "Failed: ${err}"
                  currentBuild.result = 'FAILURE'
                  step([$class: 'Mailer', recipients: 'example@example.com, recipient2@example.com'])
              }
          }

          the mail is send as:
          [...]
          X-Jenkins-Job: example_pipeline
          X-Jenkins-Result: FAILURE

          https://jenkins.example.com/blue/organizations/jenkins/example_pipeline/detail/example_pipeline/21/------------------------------------------
          [...truncated 25 lines...]
          [...]

          it would be better to send it with a line break after the url, as the ----- are treated as part of the url by some mail clients:
          [...]
          X-Jenkins-Job: example_pipeline
          X-Jenkins-Result: FAILURE

          https://jenkins.example.com/blue/organizations/jenkins/example_pipeline/detail/example_pipeline/21/
          ------------------------------------------
          [...truncated 25 lines...]
          [...]
          New: when catching a build failure and sending an email via:

          {code}
          catch (err) {
              node ('Client-Slave'){
                  echo "Failed: ${err}"
                  currentBuild.result = 'FAILURE'
                  step([$class: 'Mailer', recipients: 'example@example.com, recipient2@example.com'])
              }
          }
          {code}

          the mail is send as:

          {code:none}
          [...]
          X-Jenkins-Job: example_pipeline
          X-Jenkins-Result: FAILURE

          https://jenkins.example.com/blue/organizations/jenkins/example_pipeline/detail/example_pipeline/21/------------------------------------------
          [...truncated 25 lines...]
          [...]
          {code}

          it would be better to send it with a line break after the url, as the ----- are treated as part of the url by some mail clients:

          {code:none}
          [...]
          X-Jenkins-Job: example_pipeline
          X-Jenkins-Result: FAILURE

          https://jenkins.example.com/blue/organizations/jenkins/example_pipeline/detail/example_pipeline/21/
          ------------------------------------------
          [...truncated 25 lines...]
          [...]
          {code}
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]
          Labels New: pipeline
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 33 (Web Link)" [ 15369 ]
          Roman Pickl made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Oleg Nenashev made changes -
          Resolution Original: Cannot Reproduce [ 5 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Jesse Glick made changes -
          Released As New: 1.26
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            romanp Roman Pickl
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: