2015-12-30 2 views
0

Я использую CodeIgniter 3.0.3 и PHPMailer (https://github.com/ivantcholakov/codeigniter-phpmailer). У меня возникла проблема с конфигурацией, потому что она не отправляет электронные письма.CodeIgniter и phpmailer

Это мой конфигурационный файл:

<?php defined('BASEPATH') OR exit('No direct script access allowed.'); 

$config['useragent']  = 'PHPMailer';    // Mail engine switcher: 'CodeIgniter' or 'PHPMailer' 
$config['protocol']   = 'smtp';     // 'mail', 'sendmail', or 'smtp' 
$config['mailpath']   = '/usr/sbin/sendmail'; 
$config['smtp_host']  = 'mail.skins4points.pl'; 
$config['smtp_user']  = '[email protected]'; 
$config['smtp_pass']  = 'mypass'; 
$config['smtp_port']  = 587; 
$config['smtp_timeout']  = 5;      // (in seconds) 
$config['smtp_crypto']  = '';      // '' or 'tls' or 'ssl' 
$config['smtp_debug']  = 0;      // PHPMailer's SMTP debug info level: 0 = off, 1 = commands, 2 = commands and data, 3 = as 2 plus connection status, 4 = low level data output. 
$config['wordwrap']   = true; 
$config['wrapchars']  = 76; 
$config['mailtype']   = 'html';     // 'text' or 'html' 
$config['charset']   = null;      // 'UTF-8', 'ISO-8859-15', ...; NULL (preferable) means config_item('charset'), i.e. the character set of the site. 
$config['validate']   = true; 
$config['priority']   = 3;      // 1, 2, 3, 4, 5; on PHPMailer useragent NULL is a possible option, it means that X-priority header is not set at all, see https://github.com/PHPMailer/PHPMailer/issues/449 
$config['crlf']    = "\n";      // "\r\n" or "\n" or "\r" 
$config['newline']   = "\n";      // "\r\n" or "\n" or "\r" 
$config['bcc_batch_mode'] = false; 
$config['bcc_batch_size'] = 200; 
$config['encoding']   = '8bit';     // The body encoding. For CodeIgniter: '8bit' or '7bit'. For PHPMailer: '8bit', '7bit', 'binary', 'base64', or 'quoted-printable'. 

Я использую учетную запись электронной почты, настроенную с hekko.pl Здесь пример конфигурации почтового клиента: http://www.pomoc.hekko.pl/content/28/53/pl/konfiguracja-poczty-w-mozilla-thunderbird.html

+0

Если это действительный пароль, пожалуйста, удалите его из вопроса. – dikesh

ответ

0

Я предполагаю, что smtp_crypto потребности в be tls, если вы разговариваете с портом 587.

+0

все еще не работает – webmazz

+0

OK, поэтому установите 'smtp_debug' в 4 и посмотрите, что происходит. – Synchro

+0

'2015-12-31 11:45:05 Соединение: открытие в ssl: //mail.skins4points.pl: 587, timeout = 5, options = array() 2015-12-31 11:45:05 SMTP ERROR: Не удалось подключиться к серверу: (0) 2015-12-31 11:45:05 Ошибка SMTP connect(). https: // github.com/PHPMailer/PHPMailer/wiki/Устранение неполадок' – webmazz