[Rt-commit] r7938 - rt/branches/3.7-EXPERIMENTAL-RTIR-2.4/lib/RT/Interface

ruz at bestpractical.com ruz at bestpractical.com
Sat May 26 15:39:05 EDT 2007


Author: ruz
Date: Sat May 26 15:39:04 2007
New Revision: 7938

Modified:
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.4/lib/RT/Interface/Email.pm

Log:
* instead of sending message/rfc822 we wrap it into multipart
  message where first part is text description of the forwarded
  message.


Modified: rt/branches/3.7-EXPERIMENTAL-RTIR-2.4/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.4/lib/RT/Interface/Email.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.4/lib/RT/Interface/Email.pm	Sat May 26 15:39:04 2007
@@ -553,12 +553,20 @@
         $entity->add_part( $a->ContentAsMIME );
     }
 
+    my $description = 'This is forward of transaction #'
+        . $txn->id ." of a ticket #". $txn->ObjectId;
+
     my $mail = MIME::Entity->build(
         To => $args{'To'},
         Cc => $args{'Cc'},
         Bcc => $args{'Bcc'},
+        Type => 'text/plain',
+        Data => $description,
+    );
+    $mail->attach(
         Type => 'message/rfc822',
-        Encoding => '8bit',
+        Disposition => 'attachment',
+        Description => 'forwarded message',
         Data => $entity->as_string,
     );
 


More information about the Rt-commit mailing list