Пример #1
0
 public function testEncodeNewCharset()
 {
     $charset = 'koi8-r';
     $string = 'foo';
     $expected = '=?' . $charset . '?B?' . base64_encode($string) . '?=';
     $this->assertEquals($this->headers, $this->headers->setCharset($charset));
     $this->assertEquals($expected, $this->headers->encode($string));
 }
Пример #2
0
 /**
  * Set message charset
  *
  * @param string $charset
  *
  * @return \Sendmail\Message
  */
 public function setCharset($charset)
 {
     $this->charset = $charset;
     $this->headers->setCharset($charset);
     return $this->setContentType();
 }