There's a few things that you need to do to make it work:
- Update the templates
- Add the following code to admin/GMail/Messages/Search.pm, ~line 71:
Code:
# Add in the message preview
if (@list) {
my @mids;
for (0 .. $#list) {
push @mids, $list[$_]->{msgs_mid};
}
my $msth = $DB->table('msgsearch')->select('msgsearch_mid', 'msgsearch_body', { 'msgsearch_mid' => \@mids });
my %mid2body;
while (my ($msg_id, $msg_body) = $msth->fetchrow_array) {
$mid2body{$msg_id} = substr($msg_body, 0, $USER->{opts}->{display}->{preview} || 100);
}
for (0 .. $#list) {
$list[$_]->{msgs_preview} = $mid2body{$list[$_]->{msgs_mid}};
}
}
I'd just like to note that these changes were already added to Gossamer Mail 2.1.1.
Adrian