-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Windows Server 2012 R2
JDK 1.8.0_92
Jenkins 2.7.4
Tomcat 8.5.4
mailer-plugin 1.18
When using the new 1.18 mailer-plugin on a job which doesn't provide changesets as it e.g. only executes a batch file the resulting mail (e.g. in case of failure) contains in the first line of its content a malformed link.
Previous to version 1.18 the first 4 lines looked like this:
See <http://jenkinsserver:8080/job/Fail_Build_On_Purpose/9/>
------------------------------------------
Started by user John Doe
...
Starting from version 1.18 the first 2 (two) look like this:
http://s-hqbuildmaster1:9080/job/Fail_Build_On_Purpose/7/------------------------------------------
Started by user John Doe
...
Not only looks it different (missing "See " and "<"...">") but the resulting URL contains many "-" symbols at the end. This causes email clients like Outlook to generate wrong links.
I took a look into the code and have seen, that there was some refactoring done on September the first (https://github.com/jenkinsci/mailer-plugin/commit/432d3cf716337c361208b826770c19556eed4bf9#diff-93012b4845d2e1fb704486d5ce09c174).
The relevant file is the following: src/main/java/hudson/tasks/MailSender.java
Before that refactoring a "\n\n" was appended to the URL (append("\n\n") in line 258 in the old file). That new line is now missing. If I see it correctly adding a .append("\n\n") in the current version in line 252 should solve this URL-issue.
- is duplicated by
-
JENKINS-40224 Mailer links of failed jobs are broken with BlueOcean plugin, not redirecting properly
- Closed