Esempio n. 1
0
 /**
  * Заполняет письмо ввиде простого текста
  *
  * @param string $text
  * @param        $content_type
  *
  * @return Mail_Message_Part
  */
 public function text($text, $content_type = null)
 {
     $this->head['Content-Type'] = $content_type ? $content_type : array('text/plain', 'charset' => MIME::default_charset());
     $this->head['Content-Transfer-Encoding'] = MIME::type($this->head['Content-Type']->value)->encoding;
     $this->body = (string) $text;
     return $this;
 }