Include email in wrote lne
authorJamie Cameron <jcameron@webmin.com>
Fri, 27 Mar 2009 17:23:51 +0000 (17:23 +0000)
committerJamie Cameron <jcameron@webmin.com>
Fri, 27 Mar 2009 17:23:51 +0000 (17:23 +0000)
mailboxes/CHANGELOG
mailboxes/folders-lib.pl

index e045eed..70a01e8 100644 (file)
@@ -61,3 +61,4 @@ Added Module Config options to not include the X-Mailer and X-Originating-IP hea
 ---- Changes since 1.470 ----
 When replying to a message, the original character set is used. Also, a bug that prevented the character set from being displayed when viewing a message is fixed.
 Messages with alternate HTML and text bodies are now send with the multipart/alternative content type, which fixes the problem of Gmail showing the body twice.
+The original sender's email address is now included in the 'wrote' line when replying to or forwarding a message.
index 7662e8f..dd1e0e4 100644 (file)
@@ -2629,8 +2629,14 @@ local ($plainbody, $htmlbody) = &find_body($mail, $mode);
 local ($quote, $html_edit, $body);
 local $cfg = defined(%userconfig) ? \%userconfig : \%config;
 local @writers = &split_addresses($mail->{'header'}->{'from'});
-local $writer = &decode_mimewords($writers[0]->[1] || $writers[0]->[0]).
-               " wrote ..";
+local $writer;
+if ($writers[0]->[1]) {
+       $writer = &decode_mimewords($writers[0]->[1])." <".
+                 &decode_mimewords($writers[0]->[0])."> wrote ..";
+       }
+else {
+       $writer = &decode_mimewords($writers[0]->[0])." wrote ..";
+       }
 local $tm;
 if ($cfg->{'reply_date'} &&
     ($tm = &parse_mail_date($_[0]->{'header'}->{'date'}))) {