
// Configure global mail settings
def set_mailer = { instance, smtp_host, replyto_addr, email_suffix ->
      def mailer = instance.getDescriptor('hudson.tasks.Mailer')
      mailer.setSmtpHost(smtp_host)
      mailer.setReplyToAddress(replyto_addr)
      mailer.setCharset('UTF-8')
      mailer.setDefaultSuffix(email_suffix)
      mailer.save()
}

