anchor.diff:  
   == Usage
   
  -To see the advanced configuration for this plugin, click on the
  -*Advanced* button. This section allows you to specify recipients for
  -each type of email trigger as well as a pre-send script that can be used
  -to modify the email just prior to sending.
  +To see the advanced configuration for this plugin, click on the *Advanced* button.
  +This section allows you to specify recipients for each type of email trigger as well as a pre-send script that can be used to modify the email prior to sending.
   
   === Pre-send Scripts and Post-send Scripts
   
  -This feature allows you to write a script that can modify the
  -https://docs.oracle.com/javaee/7/api/javax/mail/internet/MimeMessage.html[`MimeMessage`]
  -object before or after sending the email. This allows adding custom
  -headers, modifying the body, etc. Predefined variables include:
  +This feature allows you to write a script that can modify the https://docs.oracle.com/javaee/7/api/javax/mail/internet/MimeMessage.html[`MimeMessage`] object before or after sending the email.
  +This allows adding custom headers, modifying the body, etc.
  +Predefined variables include:
   
   * `msg` (https://docs.oracle.com/javaee/7/api/javax/mail/internet/MimeMessage.html[`javax.mail.internet.MimeMessage`]) - The MIME email message object, which can be modified.
   * `logger` (https://docs.oracle.com/javase/8/docs/api/java/io/PrintStream.html[`java.io.PrintStream`]) - A `PrintStream` that can be used to log messages to the build log.
  
positive.code: 
  === System-wide configuration
  
  Before using this plugin from a project, you must first configure some
  system-wide settings. Go to the Jenkins system-wide configuration page
  (*Manage Jenkins*, *Configure System*).
  
  The configuration for this plugin can be found in the section entitled
  *Extended E-mail Notification*. This configuration should match the
  settings for your SMTP mail server. This section mirrors that of the
  https://plugins.jenkins.io/mailer/[Mailer plugin] in the *E-mail
  Notification* section; however, there are a few additions. The fields
  labeled *Default Subject* and *Default Content* allow you to configure
  the subject and content on a system-wide level. The field labeled
  *Default Recipients* can be used to set a default list of email
  addresses for all projects using this plugin (it can be overridden at
  the project level). This can be used to greatly simplify the
  configuration you need to do for all projects.
  
  === Project configuration
  
  For a project to use this plugin, you need to enable it in the project
  configuration page. In the *Post-build Actions* section, click on *Add
  post-build action* and then select *Editable Email Notification*.
  
  There are three main fields that you can edit when this plugin is
  enabled:
  
  * *Project Recipient List* - This is a comma (or whitespace)
  separated list of email recipients. Allows you to specify a single
  recipient list for each email that is sent.
  * *Default Subject* - This allows you to configure a token (more
  about tokens later) that can be used to easily configure all email
  subjects for the project.
  * *Default Content* - Same as *Default Subject*, but for the email
  body instead of the subject.
  
  === Pipeline step
  
  This plugin can be used from
  https://www.jenkins.io/doc/book/pipeline/[Pipeline] via the
  https://jenkins.io/doc/pipeline/steps/email-ext/[`emailext`] step:
  
  [source,groovy]
  ----
  
negative.code: 
  image::docs/images/txt.jpg[]
  
  New to version 2.9 is the ability to use Jelly scripts.
  Jelly scripts are powerful in that you can hook into the Jenkins API to get any information you want or need.
  Two Jelly scripts are packaged with this plugin, and it is also possible to write your own.
  
  There are two default Jelly scripts available out of the box; one is designed for HTML emails, and the other is designed for text emails.
  See the screenshots below for what these templates look like.
  You can specify which script you want by using the `template` argument.
  The usage for each type of script is as follows:
  
  * Text only Jelly script: `${JELLY_SCRIPT,template="text"}`
  * HTML Jelly script: `${JELLY_SCRIPT,template="html"}`
  
  You can also write your own Jelly scripts.
  The Jelly scripts are particularly powerful since they provide a hook into the Jenkins API, including https://javadoc.jenkins.io/hudson/model/AbstractBuild.html[`hudson.model.AbstractBuild`] and https://javadoc.jenkins.io/hudson/model/AbstractProject.html[`hudson.model.AbstractProject`].
  For an example on how to do this, take a look at the existing https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/resources/hudson/plugins/emailext/templates/html.jelly[`html`] and https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/resources/hudson/plugins/emailext/templates/text.jelly[`text`] scripts.
  
  Using custom Jelly scripts (those not packaged with this plugin) requires the cooperation of your Jenkins administrator.
  The steps are relatively simple:
  
  . Create the Jelly script template. The name of the script should be `<name>.jelly`. It is important that the name ends in `.jelly`.
  . Have your Jenkins administrator place the script inside `${JENKINS_HOME}/email-templates/`.
  . Use the `$JELLY_SCRIPT` token with the `template` parameter equal to your script filename without the `.jelly` extension. For example, if the script filename is `foobar.jelly`, the email content would be `${JELLY_SCRIPT,template="foobar"}`.
  
  Jelly script tips:
  
  * You can get the object of other plugin actions by querying build actions like: `${it.getAction('hudson.plugins.fitnesse.FitnesseResultsAction')}`
  * Then you need to know what functions are allowed by this action object and traverse through the result.
  
  === Groovy script content templates
  
  New to version 2.15 is the ability to use Groovy scripts.
  Scripts are powerful in that you can hook into the Jenkins API to get any information you want or need.
  There are two scripts with corresponding templates packaged with this plugin, and it is also possible to write your own.
  
  There are two default scripts and templates available out of the box; one is designed for HTML emails and the other is design for text emails.
  You can specify which script you want by using the `script` argument; you can also leave the default script and specify a different template file using the `template` argument.
  Furthermore, you can also include a script that does some initialization using the `init` argument.
  The usage for each type of script is as follows:
  
  * Text only Groovy script: `${SCRIPT, template="groovy-text.template"}`
  * HTML Groovy script: `${SCRIPT, template="groovy-html.template"}`
  
  You can also write your own scripts and templates.
  The scripts are particularly powerful since they provide a hook into the Jenkins API, including https://javadoc.jenkins.io/hudson/model/AbstractBuild.html[`hudson.model.AbstractBuild`] and https://javadoc.jenkins.io/hudson/model/AbstractProject.html[`hudson.model.AbstractProject`].
  For an example on how to do this, take a look at the existing https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/resources/hudson/plugins/emailext/templates/groovy-html.template[`html`] and https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/resources/hudson/plugins/emailext/templates/groovy-text.template[`text`] scripts.
  
  Using custom scripts (those not packaged with this plugin) requires the cooperation of your Jenkins administrator.
  The steps are relatively simple:
  
  . Create the Groovy script template. The name of the script ends in the standard extension for the language (i.e., `.groovy`). The template can be named anything.
  . Have your Jenkins administrator place the script inside `${JENKINS_HOME}/email-templates/`.
  . Use the `$SCRIPT` token with the template parameter equal to your template filename, or in addition the script parameter equal to the custom script name. For example, if the template filename is `foobar.template`, the email content would be `${SCRIPT, template="foobar.template"}`.
  
  Refer to the following examples for doing various things with the built-in Groovy templates:
  
  * link:/docs/templates/jenkins-matrix-email-html.template[`jenkins-matrix-email-html.template`]
  * link:/docs/templates/jenkins-generic-matrix-email-html.template[`jenkins-generic-matrix-email-html.template`]
  
  === Attachments
  
  New to version 2.15 is the ability to add attachments using https://ant.apache.org/manual/Types/fileset.html[the Ant pattern matching syntax] used in many places in Jenkins.
  You can set a maximum total attachment size in the *Extended E-mail Notification* section of the *Configure System* page; otherwise, it will be unlimited.
  
  === Jive Formatter
  
  link:/docs/templates/jive-formatter.groovy[`jive-formatter.groovy`] contains methods for easy and convenient formatting of emails being sent from Jenkins to Jive.
  It should be called from the *Pre-send Script* area.
  Also, it doesn't seem like Jive supports text with multiple formats, so only call one formatting method per block of text.
  
  Either `formatLine` or `formatText` can and should be called on every line of text that will be sent to the Jive system prior to calling formatting methods like color or size.
  Please test on your own instances of Jive and add functionality as you find it!
  
  The following lines should be added to the *Pre-send Script* area prior to attempting to invoke any functions:
  
  [source,groovy]
  ----
  