diff --git a/imp/lib/Contents/View.php b/imp/lib/Contents/View.php index ffb045d445c..4721262430f 100644 --- a/imp/lib/Contents/View.php +++ b/imp/lib/Contents/View.php @@ -184,12 +184,14 @@ public function viewSource() $session->close(); + $charset = $this->_contents->getMIMEMessage()->getCharset(); + return array( 'data' => $this->_contents->fullMessageText(array( 'stream' => true )), 'name' => _("Message Source"), - 'type' => 'text/plain; charset=UTF-8' + 'type' => 'text/plain; charset=' . (is_null($charset) ? 'UTF-8' : $charset) ); }