Тип письма. Экранирование ковычек в запросе
This commit is contained in:
parent
5dac5a6e19
commit
e2f5ecdbca
2 changed files with 9 additions and 3 deletions
|
|
@ -17,6 +17,7 @@ class Mail
|
|||
|
||||
protected $attachment = array ();
|
||||
protected $uniqid;
|
||||
protected $type = "text/plain";
|
||||
|
||||
function __construct() {
|
||||
$this->setEncoding("UTF-8");
|
||||
|
|
@ -70,6 +71,11 @@ class Mail
|
|||
$this->content = $text;
|
||||
}
|
||||
|
||||
function setType($type)
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Кодировка текста в письме
|
||||
*/
|
||||
|
|
@ -134,7 +140,7 @@ class Mail
|
|||
function getMessage()
|
||||
{
|
||||
$message = "--".$this->uniqid . PHP_EOL;
|
||||
$message .= $this->mimeTag("Content-Type", "text/plain", array ('charset' => $this->encoding));
|
||||
$message .= $this->mimeTag("Content-Type", $this->type, array ('charset' => $this->encoding));
|
||||
$message .= $this->mimeTag("Content-Transfer-Encoding", "8bit");
|
||||
$message .= PHP_EOL . $this->content . PHP_EOL . PHP_EOL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue