• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter and Smtp.com

Hi. I've been using Codeigniter for a while now but I cant get it to work with my smtp server Smtp.com. My code is:

$config = Array(
    'protocol' => 'smtp',
    'smtp_host' => 'smtp.com',
    'smtp_port' => 2525,
    'smtp_user' => '[email protected]',
    'smtp_pass' => 'accountpassword'
$this->load->library('email', $config);

$this->email->from('[email protected]', 'Account Manager');
$this->email->to('[email protected]');
if ($this->email->send() == FALSE){
    echo 'false';
    echo 'true';

The email is sent from my shared host IP instead of Smtp.com. I tested my account on Thunderbird and it worked. I've been trying to make it work for hours and all I can do for now is to ask for a little help.


Hi Tomassi, here you´ll find a great tutorial for mail sending with CI.

Hope it helps

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.