CodeIgniter Forums

Full Version: Send emails through CI Email library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Hello...I'm developing a system wich has to send emails to notify something to someone..

I'm using XAMP server and the CI Email library....

here is the code for my controller...

function email(){

$this->CI = &get;_instance();
        // Load needed files

$this->CI->email->from('[email protected]','Aldo Saucedo');

$this->email->to('[email protected]');

$this->email->cc('[email protected]');

//$this->email->bcc('[email protected]');

$this->email->subject('Prueba envio notificaciones');

$this->email->message('Hola, ya tienes que pagar!');

$data['title']='Sending email...';

$data['header']='Sending email now...';

$data['message']=$this->email->send()?'Message was sent successfully!':'Error sending email!';

$data['page'] = $this->config->item('softcredit_template_admin') . 'email_view';
            $data['contentx'] = $this->config->item('softcredit_template_admin') . 'email_view';
            $data['module'] = 'cobranza';


When I test test my php function whith the server off, I get this message...

Message: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

Filename: libraries/Email.php

Line Number: 1444

when I test de function whit the server running, the view shows me "Message was sent successfully!" BUT, the QK SMTP SERVER console shows me that the emails are in queue and they never sent!!

HOW CAN I FIX THAT PROBLEM!!!??? :vampire:

I really hope someone can help me

Thanks for your time!! ;-)

El Forum


Change priority and try again.

El Forum

From my experience, the Codeigniter SMTP sending library works well.

You also need to set your Port when using the library since it seems that this server runs on localhost.

El Forum


Siddhesh: I change the priority to 1 (maximum priority) and I still getting the same error

2Think: I've already put port 25.

The QK SMTP SERVER log shows me the next...

Message from <[email protected]> TO: <[email protected]> directly fail! Connect fail: Socket error #10060 Connection timed out. Wait for retry..

any idea what's happening?

Thanks for your help!! ;-)

El Forum

You mailserver settings seem to be wrong. Paste your error message
at - there are a couple of guys having the same (or simular)

Site note: better don't post your real email address in plain text here Wink
spam spam ...