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

Charset is ignored (and incorrect) in MimeMessageBuilder

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: mailer-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.580.1 / 1.598
      mailer-plugin 1.14
      workflow-plugin 1.2
    • Similar Issues:

      Description

      Symptom : using the MailStep from workflow-plugin, the generated email always has the "charset=UTF-8" in the Content-Type part header, regardless of the charset parameter, but the non-ascii characters are not properly escaped.
      e.g. the word "Synth├Ęse" in the body is escaped as "Synth=E8se" instead of "Synth=C3=A8se".

      Looking at the source code for MimeMessageBuilder, the charset parameter is indeed not used for the content, but only for addresses.

        Attachments

          Activity

          Hide
          jblanchard Jean Blanchard added a comment -

          I created a pull-request to fix this : https://github.com/jenkinsci/mailer-plugin/pull/18

          Show
          jblanchard Jean Blanchard added a comment - I created a pull-request to fix this : https://github.com/jenkinsci/mailer-plugin/pull/18
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jean Blanchard
          Path:
          src/test/java/jenkins/plugins/mailer/tasks/MimeMessageBuilderTest.java
          http://jenkins-ci.org/commit/mailer-plugin/4f5996fe4d9b0019769e38d35a3209bca833ef34
          Log:
          JENKINS-26758 Test MimeMessageBuilder charset

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jean Blanchard Path: src/test/java/jenkins/plugins/mailer/tasks/MimeMessageBuilderTest.java http://jenkins-ci.org/commit/mailer-plugin/4f5996fe4d9b0019769e38d35a3209bca833ef34 Log: JENKINS-26758 Test MimeMessageBuilder charset
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jean Blanchard
          Path:
          src/main/java/jenkins/plugins/mailer/tasks/MimeMessageBuilder.java
          http://jenkins-ci.org/commit/mailer-plugin/85d729d11fd627678f906485c26532f0bbcad085
          Log:
          JENKINS-26758 Fix MimeMessageBuilder charset

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jean Blanchard Path: src/main/java/jenkins/plugins/mailer/tasks/MimeMessageBuilder.java http://jenkins-ci.org/commit/mailer-plugin/85d729d11fd627678f906485c26532f0bbcad085 Log: JENKINS-26758 Fix MimeMessageBuilder charset
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Tom Fennelly
          Path:
          src/main/java/jenkins/plugins/mailer/tasks/MimeMessageBuilder.java
          src/test/java/jenkins/plugins/mailer/tasks/MimeMessageBuilderTest.java
          http://jenkins-ci.org/commit/mailer-plugin/f00df5e0d1a897ede828202f5a7ccf8964de310b
          Log:
          Merge pull request #18 from jeanblanchard/jenkins26758

          JENKINS-26758 Fix MimeMessageBuilder charset

          Compare: https://github.com/jenkinsci/mailer-plugin/compare/7f810ef05059...f00df5e0d1a8

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tom Fennelly Path: src/main/java/jenkins/plugins/mailer/tasks/MimeMessageBuilder.java src/test/java/jenkins/plugins/mailer/tasks/MimeMessageBuilderTest.java http://jenkins-ci.org/commit/mailer-plugin/f00df5e0d1a897ede828202f5a7ccf8964de310b Log: Merge pull request #18 from jeanblanchard/jenkins26758 JENKINS-26758 Fix MimeMessageBuilder charset Compare: https://github.com/jenkinsci/mailer-plugin/compare/7f810ef05059...f00df5e0d1a8
          Hide
          tfennelly Tom FENNELLY added a comment -

          Fix merged and new plugin release available.

          Show
          tfennelly Tom FENNELLY added a comment - Fix merged and new plugin release available.

            People

            • Assignee:
              Unassigned
              Reporter:
              jblanchard Jean Blanchard
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: