Closed koddd closed 8 years ago
with FakeSmtp.... after inititialize:
$this->email->set_newline("\r\n");
great function, it helps me! because I used previouly config $config['crlf'] = '\r\n'; $config['newline'] = '\r\n'; and nothing happend I'll back all my mail scripts to standart email library Thanks.
With this config
$config['protocol'] = 'smtp'; $config['smtp_host'] = 'localhost'; $config['smtp_user'] = ''; $config['smtp_pass'] = ''; $config['smtp_port'] = 2525; $this->email->initialize($config);
All try to send mail through smtp gives error
220 todolist.local ESMTP SubEthaSMTP null
hello:
The following SMTP error was encountered: Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
User-Agent: CodeIgniter Date: Wed, 27 Jan 2016 18:10:22 +0300 From: "temkav" sender@email.com Return-Path: sender@email.com To: receiver@email.com Subject: Email Test Reply-To: "sender@email.com" sender@email.com X-Sender: sender@email.com X-Mailer: CodeIgniter X-Priority: 3 (Normal) Message-ID: 56a8dddeab100@email.com Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Testing the email class.
06:10:22 PM - SMTP connection from 127.0.0.1/127.0.0.1, new connection count: 1 06:10:22 PM - Server: 220 todolist.local ESMTP SubEthaSMTP null 06:10:32 PM - no more lines from client
But with telnet to # telnet localhost 2525 I have successful logs temkav@temkav-A8Le:/var/www/vhosts/d$ telnet localhost 2525 Trying 127.0.1.1... Connected to temkav-A8Le.lab.loc. Escape character is '^]'. 220 todolist.local ESMTP SubEthaSMTP null HELO localhost 250 todolist.local MAIL FROM:test@localhost 250 Ok RCPT TO:test@localhost 250 Ok DATA 354 End data with.
some text of mail
.
250 Ok
QUIT
221 Bye
Connection closed by foreign host.
I'm using a FakeSMTP for testing catching mail http://nilhcem.github.io/FakeSMTP/
Thanks