Welcome Guest, Not a member yet? Register   Sign In
Unable to send an email : SMTP Error :Unable to find the socket transport "sll"
#1

[eluser]DocFunky![/eluser]
Hi ,

When I'm trying to send an email, I got the following error :

Quote:The following SMTP error was encountered: 24838153 Unable to find the socket transport "sll" - did you forget to enable it when you configured PHP?
Unable to send data: AUTH LOGIN
Failed to send AUTH LOGIN command. Error:
Unable to send data: MAIL FROM:

I can't find what is sll, So I guessed it was ssl. I found a post in this forum and red some doc and I've followed their instructions : I've then uncoment the open ssl line in my php.ini file, and restarted WAMP but that still send me that same erro. Is there a specific manip I should do ?

Thanks !
#2

[eluser]CroNiX[/eluser]
No one can really help you unless you show your problematic code.

I'm guessing you have "sll" somewhere in your settings when you probably meant "ssl", which is most commonly used in the smtp_host part if connecting to a server using SSL, such as gmail.
#3

[eluser]DocFunky![/eluser]
Ho, you were right for the sll, so here is my code :

controller :

Code:
function Confirmation(){


  //Les infos de base pour notre template
  $data['title']  = 'String Theories | Order';
  $data['contenu']   = 'Confirmation';
  
    // $this->email->initialize($config);
  $this->load->library('email', $config);
  
  $this->email->set_newline("\r\n");
  
  $this->email->from('[email protected]', 'Dan Chen');
  $this->email->to($this->session->userdata('email'));
  // $this->email->cc('[email protected]');
  // $this->email->bcc('[email protected]');

  $this->email->subject('Email Test');
  $this->email->message('Testing the email class.');

  if($this->email->send()){
   $this->parser->parse('template/template', $data);
  }else{
   // ERROR
   echo 'error with email';
   echo $this->email->print_debugger();
  }

}

and my config file :

Code:
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// Settings Preferences for the Email Class

    $config['protocol'] = 'smtp';
    $config['smtp_host']= 'ssl://smtp.googleemail.com';
    $config['smtp_port']= '465';
    $config['smtp_user']= '[email protected]';
    $config['smtp_pass']= 'mypass';
    $config['mailpath'] = '/usr/sbin/sendmail';
    $config['charset'] = 'iso-8859-1';
    $config['wordwrap'] = TRUE;

But I have the following error when I execute thqt script :

The following SMTP error was encountered: 0 php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.
Unable to send data: AUTH LOGIN
Failed to send AUTH LOGIN command. Error:
Unable to send data: MAIL FROM:
#4

[eluser]InsiteFX[/eluser]
You have one too many e's should be googlemail
#5

[eluser]Unknown[/eluser]
Thanks to Tutsplus.com, this following solution is perfect Smile))

Code:
$config = Array(
            'useragent' => 'MyName.mu',
            'protocol' => 'smtp',
            'smtp_host' => 'ssl://smtp.googlemail.com',
            'mailpath' => '/usr/sbin/sendmail',
            'smtp_port' => 465,
            'smtp_timeout' => 5,
            'smtp_user' => '[email protected]',
            'smtp_pass' => 'mypassword',
            'mailtype'  => 'html'
        );          
        $this->load->library('email', $config);
        [color=red][b]$this->email->set_newline("\r\n");[/b][/color]

            $this->email->from('[email protected]','Administrator');
            $this->email->to('[email protected]');
            $this->email->subject('Test Admin email');
            $this->email->message('User account <strong>myname2</strong> created');
            
            if($this->email->send()) {
                //echo 'Email sent!!';
            }
            else {
                show_error($this->email->print_debugger());
            }
            $this->email->clear();




Theme © iAndrew 2016 - Forum software by © MyBB