diff options
Diffstat (limited to 'program/include/rcube_imap_generic.php')
-rw-r--r-- | program/include/rcube_imap_generic.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index 29dff8613..0ae82eaca 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -83,15 +83,18 @@ class rcube_mail_header /** * Returns header value */ - public function get($name) + public function get($name, $decode = true) { $name = strtolower($name); if (isset($this->obj_headers[$name])) { - return $this->{$this->obj_headers[$name]}; + $value = $this->{$this->obj_headers[$name]}; + } + else { + $value = $this->others[$name]; } - return $this->others[$name]; + return $decode ? rcube_mime::decode_header($value, $this->charset) : $value; } /** |