• Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • email-ext-plugin
    • None

      The email-ext plugin currently has the option to send either a plain text or an HTML version of the build status email. The HTML version is easier to read, but there is no plain text alternative in the email. This affects mail clients which can only display plain text, but more importantly, when the notifications are sent to a Mailman mailing list, the content of the email in the list archive is "An HTML attachment was scrubbed...".

      It would be good to have a plain text alternative in the HTML email. This could be generated by some existing python package which converts HTML to plain text, or (less preferred) there could be a second template for the plain text version in the configuration page.

          [JENKINS-19252] Add plain text version to HTML emails

          Alex Earl added a comment -

          The way I will probably "solve" this is allowing you to override the content type per trigger, then you could have a trigger that sends plaintext and one that sends html and have a different list of people for each one. I don't think this is exactly "major" either.

          Alex Earl added a comment - The way I will probably "solve" this is allowing you to override the content type per trigger, then you could have a trigger that sends plaintext and one that sends html and have a different list of people for each one. I don't think this is exactly "major" either.

          Ian Hinder added a comment -

          Agreed; I have downgraded it to minor. I think this wouldn't quite solve the problem because just one email gets sent to the Mailman mailing list, and this is then sent out to the recipients as well as archived by Mailman. (Using Mailman provides management infrastructure allowing users to subscribe themselves; this is not possible if the list of recipients is managed solely within Jenkins.) If we want the possibility of sending HTML emails to the recipients of the mailing list, there needs to be a plain text MIME part for Mailman to archive (arguably Mailman should be able to convert the HTML into plain text or show HTML in its archive, but it doesn't do that). One workaround would be to use a postprocessing script to make a plain text version of the email, but the script has to be written in Groovy, which I'm not familiar with.

          Ian Hinder added a comment - Agreed; I have downgraded it to minor. I think this wouldn't quite solve the problem because just one email gets sent to the Mailman mailing list, and this is then sent out to the recipients as well as archived by Mailman. (Using Mailman provides management infrastructure allowing users to subscribe themselves; this is not possible if the list of recipients is managed solely within Jenkins.) If we want the possibility of sending HTML emails to the recipients of the mailing list, there needs to be a plain text MIME part for Mailman to archive (arguably Mailman should be able to convert the HTML into plain text or show HTML in its archive, but it doesn't do that). One workaround would be to use a postprocessing script to make a plain text version of the email, but the script has to be written in Groovy, which I'm not familiar with.

          Alex Earl added a comment -

          I know there are python packages for this, but there isn't really a good way to run it through a python script from Java without including Jython, which I don't think is a good idea. I will see if there is anything Groovy based that will do something similar, if not, I'm not sure what else to do with this. Jsoup might be another option I guess.

          Alex Earl added a comment - I know there are python packages for this, but there isn't really a good way to run it through a python script from Java without including Jython, which I don't think is a good idea. I will see if there is anything Groovy based that will do something similar, if not, I'm not sure what else to do with this. Jsoup might be another option I guess.

          Alex Earl added a comment -

          You describe the desire that users can subscribe themselves to the list for emails, I am planning on adding this feature as described in https://issues.jenkins-ci.org/browse/JENKINS-18567.

          Alex Earl added a comment - You describe the desire that users can subscribe themselves to the list for emails, I am planning on adding this feature as described in https://issues.jenkins-ci.org/browse/JENKINS-18567 .

          Alex Earl added a comment -

          You can send separate emails to the mailman list and the recipients with different content types with the latest version of the plugin.

          Alex Earl added a comment - You can send separate emails to the mailman list and the recipients with different content types with the latest version of the plugin.

          Erik Brangs added a comment -

          Not having a plaintext alternative in an HTML mail increases the spam score of mails processed by SpamAssassin via the rule MIME_HTML_ONLY BODY . Is there any chance that an option to send HTML mails with plaintext alternative could be provided?

          Erik Brangs added a comment - Not having a plaintext alternative in an HTML mail increases the spam score of mails processed by SpamAssassin via the rule MIME_HTML_ONLY BODY . Is there any chance that an option to send HTML mails with plaintext alternative could be provided?

          Alex Earl added a comment -

          I am no longer the maintainer of this plugin, you may want to file a new issue.

          Alex Earl added a comment - I am no longer the maintainer of this plugin, you may want to file a new issue.

            slide_o_mix Alex Earl
            ianhinder Ian Hinder
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: