- ) .'">mbox</a>)'.":</p>\n";
- $output .= handle_email_message($record->{text},
+ ) .'">mbox</a>, ';
+ my $parser = MIME::Parser->new();
+
+ # this will be cleaned up once it goes out of scope
+ my $tempdir = File::Temp->newdir();
+ $parser->output_under($tempdir->dirname());
+ $parser->filer->ignore_filename(1);
+ my $entity;
+ if ($record->{inner_file}) {
+ $entity = $parser->parse($record->{fh});
+ } else {
+ $entity = $parser->parse_data($record->{text});
+ }
+ my $r_l = reply_headers($entity);
+ $output .= q(<a href=").
+ html_escape('mailto:'.$bug_number.'@'.$config{email_domain}.'?'.
+ join('&',map {defined $r_l->{$_}?$_.'='.uri_escape_utf8($r_l->{$_}):()} keys %{$r_l})).
+ qq(">reply</a>);
+
+ $output .= ')'.":</p>\n";
+ $output .= handle_email_message($entity,