From: Andrew DeFaria Date: Fri, 29 Sep 2017 16:36:24 +0000 (-0700) Subject: Added Subject to email address X-Git-Url: https://defaria.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=267b7dcc740e1cf29d5a9a2aa65b526abd1af3b0;p=clearscm.git Added Subject to email address This is not perfect as we reach into the @msgs array to grep the first subject line. A sender with multiple messages may very well have different subject lines. Also we needed to make a copy of @msgs. Apparently a reference into the @msgs array messes up the later pop operation. --- diff --git a/maps/bin/detail.cgi b/maps/bin/detail.cgi index 7631983..b90f13d 100755 --- a/maps/bin/detail.cgi +++ b/maps/bin/detail.cgi @@ -171,6 +171,7 @@ sub PrintTable { foreach my $sender (ReturnSenders $userid, $type, $next, $lines, $date) { my @msgs = ReturnMessages $userid, $sender; + my @msgs2 = @msgs; $next++; print @@ -191,12 +192,12 @@ sub PrintTable { -width => '100%', -bgcolor => '#d4d0c8'}; print - td {-class => 'tablelabel', - -valign => 'middle', - -width => '40'}, 'Sender:', - td {-class => 'sender', - -valign => 'middle'}, - a {-href => "mailto:$sender"}, $sender; + td {-class => 'tablelabel', + -valign => 'middle', + -width => '40'}, 'Sender:', + td {-class => 'sender', + -valign => 'middle'}, + a {-href => "mailto:$sender?subject=$msgs2[0][0]"}, $sender; print end_table;