public function getContents()
    {
        if ($this->contents) {
            if ($this->contents[0]->getType() !== 'text/plain'
            && count($this->contents) > 1
            ) {
                foreach ($this->contents as $key => $value) {
                    if ($value->getType() == 'text/plain') {
                        $plain_content = $value;
                        unset($this->contents[$key]);
                        break;
                    }
                }
                array_unshift($this->contents, $plain_content);
            }
        }

        return $this->contents;
    }