[Rt-commit] rt branch, 4.4/crypt-digest-email, created. rt-4.4.4-103-g1d0b5b69c8

Jim Brandt jbrandt at bestpractical.com
Fri May 15 13:34:52 EDT 2020


The branch, 4.4/crypt-digest-email has been created
        at  1d0b5b69c828c67b9d6d4c3ea05e4bfcbe069379 (commit)

- Log -----------------------------------------------------------------
commit 1d0b5b69c828c67b9d6d4c3ea05e4bfcbe069379
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri May 15 13:27:55 2020 -0400

    Add encryption and signing options for digest email

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index f59de9ca2c..fd3fd675cf 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2991,6 +2991,10 @@ Set C<Dashboards> to a hash with Encrypt and Sign keys to control
 whether dashboards should be encrypted and/or signed correspondingly.
 By default they are not encrypted or signed.
 
+Similarly, set C<DigestEmail> to a hash with Encrypt and Sign set to 1
+to control whether digest email should be encrypted and/or signed.
+By default they are not encrypted or signed.
+
 =back
 
 =cut
@@ -3008,6 +3012,10 @@ Set( %Crypt,
         Encrypt => 0,
         Sign    => 0,
     },
+    DigestEmail => {
+        Encrypt => 0,
+        Sign    => 0,
+    },
 );
 
 =head2 SMIME configuration
diff --git a/sbin/rt-email-digest.in b/sbin/rt-email-digest.in
index 23287184d5..00bc43724e 100644
--- a/sbin/rt-email-digest.in
+++ b/sbin/rt-email-digest.in
@@ -175,11 +175,20 @@ sub send_digest {
     $digest_template->MIMEObj->head->replace(
         'To',   Encode::encode( "UTF-8", $to ) );
 
+    my $ok;
     if ($print) {
         $digest_template->MIMEObj->print;
         return 1;
     } else {
-        return  RT::Interface::Email::SendEmail( Entity      => $digest_template->MIMEObj)
+        my $ok = RT::Interface::Email::SendEmail(
+            %{ RT->Config->Get('Crypt')->{'DigestEmail'} || {} },
+            Entity => $digest_template->MIMEObj );
+
+        if (!$ok) {
+            RT->Logger->error("Failed to send email digest to $to");
+        }
+
+        return $ok;
     }
 }
 

-----------------------------------------------------------------------


More information about the rt-commit mailing list