Здравствуйте
Использую CodeIgniter, файл библиотеки email и контроллер в кодировках utf-8
Сделал контроллер для отправки email
PHP:
скопировать код в буфер обмена
function mymail(){ $this->load->library('email'); $config['protocol'] = 'mail'; $config['smtp_host'] = 'ssl://smtp.gmail.com'; $config['smtp_user'] = 'test@gmail.com'; $config['smtp_pass'] = 'test'; $config['smtp_port'] = '465'; $config['smtp_timeout'] = '5'; $config['wordwrap'] = TRUE; $config['mailtype'] = 'text'; $config['charset'] = 'UTF-8'; $config['priority'] = '1'; $this->email->initialize($config);//передаем настройки в класс email $this->email->from('test@gmail.com', 'test@gmail.com'); $this->email->to('komu@gmail.com'); $this->email->subject('thema'); $this->email->message('text'); $this->email->send(); echo $this->email->print_debugger(); }
после выполнения скрипта результат такой
Цитата:
Your message has been successfully sent using the following protocol: mail
User-Agent: CodeIgniter
Date: Tue, 11 Feb 2014 15:29:19 +0400
From: "test@gmail.com" <test@gmail.com>
Return-Path: <test@gmail.com>
Reply-To: "test@gmail.com" <test@gmail.com>
X-Sender: test@gmail.com
X-Mailer: CodeIgniter
X-Priority: 1 (Highest)
Message-ID: <52fa098fdcebf@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
=?UTF-8?Q?thema?=
text
Почему Тема письма начинается с =?UTF-8?Q? и заканчивается ?=
как исправить
|