0
$config = Array(
    'protocol' => 'mail',
    'smtp_host' => 'mail.salefiesta.com',
    'smtp_port' => 587,
    'smtp_user' => 'info@salefista.com',
    'smtp_pass' => 'password',
    'mailtype'  => 'html', 
    'charset'=>'iso-8859-1',
    'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('info@salefista.com','salefiesta');
$this->email->to('brijeshdubeyid@gmail.com');
$this->email->message("Hello Brijesh"); 
if ($this->email->send()) {
    echo "success";
    echo $this->email->print_debugger();
} else {
    echo "fail";
}

Please help me to solve issue.

Please check and let me know where i am wrong.

Thank you

fabrik
  • 14,094
  • 8
  • 55
  • 71
Brijesh Dubey
  • 118
  • 2
  • 12

1 Answers1

0

i think the issue is with the smtp_host that you set. i had the same issue before, then i tried to use the relay server that godaddy specified which is something like smtp_host=>'<relayserver>.prod.sin2.secureserver.net', and it worked well.

edit: by the way godaddy mail servers are notorious for being slow and unreliable, and they wont allow you to use any other mail server like gmail i posted this problem on their forum before but without any help

edit: another thing that i noticed is that you did not specified smtp_crypto which is set as null by default.

here is my complete configuration

$config = array(
    'protocol' => 'mail',
    'smtp_host' => '<relayserver>.prod.sin2.secureserver.net',
    'smtp_port' => 465,
    'smtp_user' => 'info@salefista.com',
    'smtp_pass' => 'password',
    'mailtype'  => 'html', 
    'smtp_crypto'  => 'ssl', 
    'charset'=>'iso-8859-1',
    'wordwrap' => TRUE
);

note: this should also work at local server (i tested it).

SenseofDeath
  • 271
  • 1
  • 3
  • 5