Welcome Guest, Not a member yet? Register   Sign In
taking forever to send email using Codeigniter email library
#1

[eluser]MikeW1911[/eluser]
Hello, please keep in mind I am a beginner to Codeigniter and that I am using version 2.1.0, thank you.

I am trying to send an email using this controller code:

Code:
class Email extends CI_Controller {



public function index(){
  $config = Array(
   'protocol' => 'smtp',
   'smtp_host' => 'ssl://smtp.googlemail.com',
   'smtp_port' => 465,
   'smtp_user' => 'my gmail email address',
   'smtp_pass' => 'my gmail password',
   'mailtype'  => 'html',
      'charset'   => 'iso-8859-1'
  );
  $this->load->library('email', $config);
  
  $this->email->set_newline('\r\n');
  
  $this->email->from('my gmail email address', 'some guy');
  $this->email->to('my hotmail email address');
  $this->email->subject('this is an email test');
  $this->email->message('it is working. Great!');
  
  if ($this->email->send()){
   echo 'Your email was sent, fool.';
  }
  else{
   show_error($this->email->print_debugger());
  }
}
}

When I load the controller, the page does not finishing loading for some reason; I see neither "Your email was sent, fool." nor a debug report on the page. Tell me I didn't make a dumb mistake.


Messages In This Thread
taking forever to send email using Codeigniter email library - by El Forum - 04-27-2012, 11:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB