Warning: Cannot use a scalar value as an array in /home/admin/public_html/forum/include/fm.class.php on line 757

Warning: Invalid argument supplied for foreach() in /home/admin/public_html/forum/include/fm.class.php on line 770
Форумы портала PHP.SU :: Версия для печати :: CodeIgniter проблема с темой email
Форумы портала PHP.SU » » CMS и фреймворки » CodeIgniter проблема с темой email

Страниц (1): [1]
 

1. Konstantin - 11 Февраля, 2014 - 13:34:21 - перейти к сообщению
Здравствуйте
Использую CodeIgniter, файл библиотеки email и контроллер в кодировках utf-8
Сделал контроллер для отправки email

PHP:
скопировать код в буфер обмена
  1.  
  2.   function mymail(){
  3. $this->load->library('email');
  4. $config['protocol'] = 'mail';
  5. $config['smtp_host'] = 'ssl://smtp.gmail.com';
  6. $config['smtp_user'] = 'test@gmail.com';
  7. $config['smtp_pass'] = 'test';
  8. $config['smtp_port'] = '465';
  9. $config['smtp_timeout'] = '5';
  10. $config['wordwrap'] = TRUE;
  11. $config['mailtype'] = 'text';
  12. $config['charset'] = 'UTF-8';
  13. $config['priority'] = '1';
  14.  
  15. $this->email->initialize($config);//передаем настройки в класс email
  16.  
  17. $this->email->from('test@gmail.com', 'test@gmail.com');
  18. $this->email->to('komu@gmail.com');
  19. $this->email->subject('thema');
  20. $this->email->message('text');
  21.  
  22. $this->email->send();
  23. echo $this->email->print_debugger();
  24.   }
  25.  

после выполнения скрипта результат такой
Цитата:

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? и заканчивается ?=
как исправить
2. ksedin - 11 Февраля, 2014 - 13:40:21 - перейти к сообщению
'v

 

Powered by ExBB FM 1.0 RC1