--- MessageBox	2010-05-25 23:00:03.000000000 +0200
+++ MessageBox.new	2010-10-30 17:06:49.000000000 +0200

@@ -56,12 +56,31 @@
 if ( $QuoteTransaction ) {
     my $transaction = RT::Transaction->new( $session{'CurrentUser'} );
     $transaction->Load( $QuoteTransaction );
-    $message = $transaction->Content( Quote => 1 );
+
+    my $attachments = $transaction->Attachments;
+    $attachments->Columns( qw( Id Filename ContentType Headers Subject Parent ContentEncoding ContentType TransactionId) );
+    my $Attachments = $attachments->ItemsArrayRef();
+    my $attid= $Attachments->[0]->id;
+    my $root_att = RT::Attachment->new( $session{'CurrentUser'} );
+    $root_att->Load($attid);
+    my $head = $root_att->Headers();
+    my $h2;
+    (my $subj) = ($head =~ /^Subject:\s?(.*)$/gmi); if ($subj) {$h2="Subject: $subj\n$h2";}
+    (my $cc) = ($head =~ /^Cc:\s?(.*)$/gmi); if ($cc) {$h2="CC: $cc\n$h2";}
+    (my $to) = ($head =~ /^To:\s?(.*)$/igm); if ($to) {$h2="To: $to\n$h2";}
+    (my $from) = ($head =~ /^From:\s?(.*)$/gmi); if ($from) {$h2="From: $from\n$h2";}
+#    (my $when) = ($head =~ /^Date:\s?(.*)$/gmi); if ($when) {$h2="Date: $when\n$h2";}
+    $message = $h2."\n".  $transaction->Content( Quote => 1 );
 }

