title: codeigniter - send email wamp gmail
body: <p>I read other topics but not resolved my problem..</p>
  
  <p>I have this in my controller:</p>
  
  <pre><code>$this-&gt;load-&gt;library("email");  
  $this-&gt;email-&gt;from(set_value("email"),
  set_value("nome"),set_value("msg"));  
  $this-&gt;email-&gt;to("my@gmail.com");
  $this-&gt;email-&gt;subject("Mensagem");
  $this-&gt;email-&gt;message(set_value("msg"));
  $this-&gt;email-&gt;send();
  echo  $this-&gt;email-&gt;print_debugger();
  </code></pre>
  
  <p>and my library email:</p>
  
  <pre><code>var $useragent = "CodeIgniter";
  var $mailpath       = "/usr/sbin/sendmail";
  var $protocol       = "smtp";
  var $smtp_host      = "smtp.gmail.com";
  var $smtp_user      = "xxx@gmail.com";
  var $smtp_pass      = "xxx";
  var $smtp_port      = "465";
  var $smtp_timeout   = 5;
  var $smtp_crypto    = "";
  var $wordwrap       = TRUE;
  var $wrapchars      = "76";
  var $mailtype       = "html";
  var $charset        = "utf-8";
  var $multipart      = "mixed";
  var $alt_message    = '';   
  var $validate       = FALSE;
  var $useragent = "CodeIgniter";
  var $mailpath       = "/usr/sbin/sendmail";
  var $protocol       = "smtp";
  var $smtp_host      = "smtp.gmail.com";
  var $smtp_user      = "xxx@gmail.com";
  var $smtp_pass      = "xxx";
  var $smtp_port      = "465";
  var $smtp_timeout   = 5;
  var $smtp_crypto    = "";
  var $wordwrap       = TRUE;
  var $wrapchars      = "76";
  var $mailtype       = "html";
  var $charset        = "utf-8";
  var $multipart      = "mixed";
  var $alt_message    = '';   
  var $validate       = FALSE;
  </code></pre>
  
  <p>...</p>
  
  <p>I also change php.ini for: (wamp - bin - apache - apache2.4.4 - bin - php.ini) </p>
  
  <blockquote>
    <p>extension=php_openssl.dll</p>
  </blockquote>
  
  <p>But I have da same problem... not work:</p>
  
  <blockquote>
    <p>Message: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()</p>
    
    <p>Filename: libraries/Email.php</p>
    
    <p>Line Number: 1553
    Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.</p>
  </blockquote>
  
  <p>Line Number 1553 for email.php have this:</p>
  
  <blockquote>
    <p>if ( ! mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str, "-f ".$this->clean_email($this->_headers['From']))){
    return FALSE;}else{
    return TRUE;}</p>
  </blockquote>
  
  <pre><code>if ( ! mail($this-&gt;_recipients, $this-&gt;_subject, $this-&gt;_finalbody, $this-_header_str, "-f ".$this-&gt;clean_email($this-&gt;_headers['From']))){
      return FALSE;
  }else{
      return TRUE;
  }
  </code></pre>
  
  <p>I need help... tks</p>