[Rt-commit] rt branch, 4.4/email-file-attachments, updated. rt-4.4.2-20-g933cecb

Jim Brandt jbrandt at bestpractical.com
Fri Jul 28 15:45:11 EDT 2017


The branch, 4.4/email-file-attachments has been updated
       via  933cecba2739e9f6fbc22bdffe53ff59aff9c962 (commit)
      from  b6e53aad08954ea497ca5ad96230132f3a92b09a (commit)

Summary of changes:
 lib/RT/Ticket.pm | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 933cecba2739e9f6fbc22bdffe53ff59aff9c962
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jul 28 15:38:44 2017 -0400

    Restore attached email parsing when $TreatAttachedEmailAsFiles is not set
    
    For cases where RT parses emails that come in as attachments to
    other email, restore the previous parsing of additional headers.
    This will show email addresses from attached email as suggestions on
    the People page and on reply. This is useful to more easily set up
    roles on a ticket in cases where someone forwards email into RT
    that was intended for another person or queue.
    
    The $TreatAttachedEmailAsFiles option now provides an alternate
    behavior for email attachments that doesn't try to parse attached
    email. When this is set, get email addresses only from the parent
    attachment.

diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index 3a24100..0f073c3 100644
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -1052,10 +1052,14 @@ sub TransactionAddresses {
     $attachments->LimitByTicket( $self->id );
     $attachments->Columns( qw( id Headers TransactionId));
 
-    $attachments->Limit(
-        FIELD => 'Parent',
-        VALUE => 0,
-    );
+    # If $TreatAttachedEmailAsFiles is set, don't parse child attachments
+    # for email addresses.
+    if ( RT->Config->Get('TreatAttachedEmailAsFiles') ){
+        $attachments->Limit(
+            FIELD => 'Parent',
+            VALUE => 0,
+        );
+    }
 
     $attachments->Limit(
         ALIAS         => $attachments->TransactionAlias,

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


More information about the rt-commit mailing list