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

#1
[eluser]Unknown[/eluser]
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:

Code:
$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]');
$this->email->subject('Subject');
$this->email->message('Message');
if ($this->email->send() == FALSE){
    echo 'false';
}
else{
    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.

Thanks.

#2
[eluser]Ener1[/eluser]
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.