projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9a5916
)
19967: Read Mail shows empty content with option 'Always plain text'
issue_19967
author
TJ
<virtualmin@iam.tj>
Wed, 26 Oct 2011 00:50:23 +0000
(
01:50
+0100)
committer
TJ
<virtualmin@iam.tj>
Wed, 26 Oct 2011 00:50:23 +0000
(
01:50
+0100)
mailboxes/folders-lib.pl
patch
|
blob
|
history
diff --git
a/mailboxes/folders-lib.pl
b/mailboxes/folders-lib.pl
index
231b3ea
..
78d7587
100755
(executable)
--- a/
mailboxes/folders-lib.pl
+++ b/
mailboxes/folders-lib.pl
@@
-2169,7
+2169,19
@@
foreach $a (@{$_[0]->{'attach'}}) {
}
}
if ($_[1] == 0) {
- $body = $textbody;
+ if ($textbody) {
+ $body = $textbody;
+ }
+ elsif ($htmlbody) {
+ local $text = &html_to_text($htmlbody->{'data'});
+ $body = $textbody =
+ { 'data' => $text };
+ }
+ else {
+ local $text = "<strong>This email has no content.</strong>";
+ $body = $textbody =
+ { 'data' => $text };
+ }
}
elsif ($_[1] == 1) {
$body = $textbody || $htmlbody;