• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
getting problem with the in sending email with gmail

#1
[eluser]Unknown[/eluser]
Hello Sir, I am continuously getting error with the code,I checked your from and googled a lot but didn't find anything wrong. Please guide me to solve this problem.
here is the code:-

Code:
<?php
  /* SENDING EMAIL WITH GAMIL */
  class Email extends CI_Controller {
      function _construct() {
          parent::Controller();
      }
      function index() {
          $config = array (
               'protocol' => 'smtp',
               'smtp_host' => 'ssl://smtp.googlemail.com',
               'smtp_port' => 465,
               'smtp_user' => 'sorrakowah@gmail.com',
               'smtp_pass' => 'praveenpuglia',
               'smtp_timeout' => 10
          );
          $this->load->library('email',$config);
          $this->email->setnewline("\r\n");
          $this->email->from('sorrakowah@gmail.com','asd');
          $this->email->to('sorrakowah@gmail.com');
          $this->email->subject('checking this mail');
          $this->email->message('yee...i win');
          if($this->email->send()){
              echo 'mail sent';
          }
          else  show_error($this->email->print_debugger());
      }
  }
?>

solved........ Smile

#2
[eluser]iainco[/eluser]
You might want to change your gmail password since you posted it in your code snippet!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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