Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter from Scratch (Day3) ssl error
#1

[eluser]Energetic Pixels[/eluser]
Ok, I don't know if this is a CI error on my part or not. But I have been trying to follow Jeffrey Way's video tutorials (CodeIgniter from Scratch). I am currently on day3 and working on the first part of that video where we are attempting to send a simple email straight from the 'email' controller. But I am getting a SSL error saying that we cannot connect to ssl://smtp.googlemail.com from port 587. I have tried both smpt.googlemail.com and smtp.gmail.com for both ports 465 and 587. I have also tried this same code from the house (to get around any firewalls here at the office) and still have the same error code. Can anyone point me in the right direction??

XAMPP version 1.8.0
CI version 2.1.2
Windows 7 Enterprise (office) Windows 7 Home (home)

XAMPP status says that HTTPS (SSL) is activated.

Below is my controller as I was following Mr. Way. I have changed username and password information (of course) in this post.

Tony

Code:
<?php

class Email extends CI_Controller {

/*function __construct() {
  
  parent::Controller();
}*/

function index() {
  
  $config = Array(
   'protocol' => 'smtp',
   'smtp_host' => 'ssl://smtp.googlemail.com',
   'smtp_port' => 587,   /* 465 or 587 normally or supposed to work */
   'smtp_user' => '[email protected]',
   'smtp_pass' => 'somepass');
  
  $this->load->library('email', $config);
  
  $this->email->set_newline('\r\n');
  
  $this->email->from('[email protected]', 'Anthony Jackman');
  
  $this->email->to('[email protected]');
  
  $this->email->subject('This is an email test');
  
  $this->email->message('It is working.  Awesome!');
  
  if($this->email->send()) {
  
   echo "Your email was sent, foot";
  }
  
  else {
   show_error($this->email->print_debugger());
  }
}


}
#2

[eluser]Energetic Pixels[/eluser]
Never Mind! I found my problem. Dang corporate IT peeps setting client side port closures.

Everything works as Mr Way said it would.

Tony




Theme © iAndrew 2016 - Forum software by © MyBB