Как удалить специальный символ из электронной почты с помощью codeignitor
В электронном письме добавлен какой-то специальный символ, не знаю, почему и как это происходит с помощью codeignitor, как решить эту проблему, это мой Email. php системный файл пожалуйста, направьте
protected function _build_message()
{
if ($this->wordwrap === TRUE && $this->mailtype !== 'html')
{
$this->_body = $this->word_wrap($this->_body);
}
$this->_set_boundaries();
$this->_write_headers();
$hdr = ($this->_get_protocol() === 'mail') ? $this->newline : '';
$body = '';
switch ($this->_get_content_type())
{
case 'plain' :
$hdr .= 'Content-Type: text/plain; charset='.$this->charset.$this->newline
.'Content-Transfer-Encoding: '.$this->_get_encoding();
if ($this->_get_protocol() === 'mail')
{
$this->_header_str .= $hdr;
$this->_finalbody = $this->_body;
}
else
{
$this->_finalbody = $hdr.$this->newline.$this->newline.$this->_body;
}
return;
case 'html' :
if ($this->send_multipart === FALSE)
{
$hdr .= 'Content-Type: text/html; charset='.$this->charset.$this->newline
.'Content-Transfer-Encoding: quoted-printable';
}
else
{
$hdr .= 'Content-Type: multipart/alternative; boundary="'.$this->_alt_boundary.'"';
$body .= $this->_get_mime_message().$this->newline.$this->newline
.'--'.$this->_alt_boundary.$this->newline
.'Content-Type: text/plain; charset='.$this->charset.$this->newline
.'Content-Transfer-Encoding: '.$this->_get_encoding().$this->newline.$this->newline
.$this->_get_alt_message().$this->newline.$this->newline.'--'.$this->_alt_boundary.$this->newline
.'Content-Type: text/html; charset='.$this->charset.$this->newline
.'Content-Transfer-Encoding: quoted-printable'.$this->newline.$this->newline;
}
$this->_finalbody = $body.$this->_prep_quoted_printable($this->_body).$this->newline.$this->newline;
if ($this->_get_protocol() === 'mail')
{
$this->_header_str .= $hdr;
}
else
{
$this->_finalbody = $hdr.$this->newline.$this->newline.$this->_finalbody;
}
if ($this->send_multipart !== FALSE)
{
$this->_finalbody .= '--'.$this->_alt_boundary.'--';
}
return;
case 'plain-attach' :
$hdr .= 'Content-Type: multipart/'.$this->multipart.'; boundary="'.$this->_atc_boundary.'"';
if ($this->_get_protocol() === 'mail')
{
$this->_header_str .= $hdr;
}
$body .= $this->_get_mime_message().$this->newline
.$this->newline
.'--'.$this->_atc_boundary.$this->newline
.'Content-Type: text/plain; charset='.$this->charset.$this->newline
.'Content-Transfer-Encoding: '.$this->_get_encoding().$this->newline
.$this->newline
.$this->_body.$this->newline.$this->newline;
break;
case 'html-attach' :
$hdr .= 'Content-Type: multipart/'.$this->multipart.'; boundary="'.$this->_atc_boundary.'"';
if ($this->_get_protocol() === 'mail')
{
$this->_header_str .= $hdr;
}
$body .= $this->_get_mime_message().$this->newline.$this->newline
.'--'.$this->_atc_boundary.$this->newline
.'Content-Type: multipart/alternative; boundary="'.$this->_alt_boundary.'"'.$this->newline.$this->newline
.'--'.$this->_alt_boundary.$this->newline
.'Content-Type: text/plain; charset='.$this->charset.$this->newline
.'Content-Transfer-Encoding: '.$this->_get_encoding().$this->newline.$this->newline
.$this->_get_alt_message().$this->newline.$this->newline.'--'.$this->_alt_boundary.$this->newline
.'Content-Type: text/html; charset='.$this->charset.$this->newline
.'Content-Transfer-Encoding: quoted-printable'.$this->newline.$this->newline
.$this->_prep_quoted_printable($this->_body).$this->newline.$this->newline
.'--'.$this->_alt_boundary.'--'.$this->newline.$this->newline;
break;
}
$attachment = array();
for ($i = 0, $c = count($this->_attachments), $z = 0; $i < $c; $i++)
{
$filename = $this->_attachments[$i]['name'][0];
$basename = ($this->_attachments[$i]['name'][1] === NULL)
? basename($filename) : $this->_attachments[$i]['name'][1];
$attachment[$z++] = '--'.$this->_atc_boundary.$this->newline
.'Content-type: '.$this->_attachments[$i]['type'].'; '
.'name="'.$basename.'"'.$this->newline
.'Content-Disposition: '.$this->_attachments[$i]['disposition'].';'.$this->newline
.'Content-Transfer-Encoding: base64'.$this->newline
.(empty($this->_attachments[$i]['cid']) ? '' : 'Content-ID: <'.$this->_attachments[$i]['cid'].'>'.$this->newline);
$attachment[$z++] = $this->_attachments[$i]['content'];
}
$body .= implode($this->newline, $attachment).$this->newline.'--'.$this->_atc_boundary.'--';
$this->_finalbody = ($this->_get_protocol() === 'mail')
? $body
: $hdr.$this->newline.$this->newline.$body;
return TRUE;
}
Какой правильный способ исправить это, пожалуйста, сообщите заранее спасибо
еще одна вещь, которую я хотел бы сказать, что я использую smtp_crypto => tls, вызывающую проблему