anchor.diff:  
   Post-send scripts are available starting with version 2.41.
   
  -=== Use rewritten Message-ID from AWS SES for In-Reply-To header
  +=== Use Rewritten Message ID from Amazon SES for `In-Reply-To` Header
   
  -The Amazon Simple Email Service (https://aws.amazon.com/ses/[AWS SES])
  -rewrites the Message-ID header of outgoing emails. That means subsequent
  -failure/success notifications will not be in the same thread, because
  -they reference a non-existing message id in the In-Reply-To header.
  +The Amazon Simple Email Service (https://aws.amazon.com/ses/[SES]) rewrites the message ID of outgoing emails.
  +This means subsequent failure/success notifications will not be in the same thread, because they reference a nonexistent message ID in the `In-Reply-To` header.
   
  -The rewritten message id is returned as last message of the SMTP
  -transaction, e.g.
  +The rewritten message ID is returned as last message of the SMTP transaction:
   
  - 250 Ok <00000123456abcde-1234abcd-abcd-1234-1234-1234abcd1234-000000@eu-west-1.amazonses.com>
  +----
  +250 Ok <00000123456abcde-1234abcd-abcd-1234-1234-1234abcd1234-000000@eu-west-1.amazonses.com>
  +----
   
  -The following post-send script fetches the rewritten message id for
  -later correct In-Reply-To headers:
  +The following post-send script fetches the rewritten message ID for later use in `In-Reply-To` headers:
   
  -*Use AWS SES Message-ID*
  -
  +.Use Amazon SES Message ID
   [source,groovy]
   ----
   import com.sun.mail.smtp.SMTPTransport;
  +import hudson.plugins.emailext.ExtendedEmailPublisherDescriptor;
   import java.util.regex.Matcher;
   import java.util.regex.Pattern;
  -import hudson.plugins.emailext.ExtendedEmailPublisherDescriptor;
   
   String smtpHost = props.getProperty("mail.smtp.host", "");
   String awsRegex = "^email-smtp\\.([a-z0-9-]+)\\.amazonaws\\.com\$";
  
positive.code: [[email-ext-plugin-recipes]]
  = email-ext-plugin Recipes
  :toc: macro
  :toc-title:
  ifdef::env-github[]
  
negative.code: }
  
  recipients = msg.getRecipients(javax.mail.Message.RecipientType.TO)
  filtered = recipients.findAll { addr -> includedInWhitelist(addr) > 0 }
  msg.setRecipients(javax.mail.Message.RecipientType.TO, filtered as javax.mail.Address[])
  ----
  
  