Welcome Guest, Not a member yet? Register   Sign In
[Email Library] - Failed to send AUTH LOGIN command - Encryption Needed
#1
Bug 

Hi.

Today i go some problem with the email library where the server does not support  SMTP plain text auth.

PHP Code:
   $config['useragent'   "CodeIgniter";
 
   $config['mailpath'    "/usr/bin/sendmail"// or "/usr/sbin/sendmail"
 
   $config['wordwrap'    TRUE;
 
   $config['mailtype'    'html';
 
   $config['charset'     strtoupper(get_option('smtp_email_charset'));
 
   $config['newline'     "\r\n";
 
   $config['crlf'        "\r\n";
 
   $config['protocol'    'smtp';
 
   $config['smtp_host'   'ssl://domain.com'
 
   $config['smtp_port'   465;
 
   $config['smtp_timeout'] = '30';
 
   $config['smtp_user'   '[email protected]';
 
   $config['smtp_pass'   'passwordgoeshere'

This is the current configuration.
When echo the email print debugger the following error occurs:
Failed to send AUTH LOGIN command.Error 535 5.7.8 Error: Authentication failed:encryption needed to use mechanism.

I was able to see in the email library Codeigniter use AUTH LOGIN with unencrypted BASE64 encoding.
To support full web standards, Codeigniter should be able to use CRAM-MD5 or DIGEST-MD5 for SMTP authentication.

Any suggestions how this problem could be solved or possible Codeigniter bug?

Thanks.
Reply
#2

1. Change/add these settings:

Code:
$config['smtp_host']        = 'domain.com';
$config['smtp_crypto']      = 'ssl';

2. I am not capable to mess with the original email library, this area of knowledge is complex. I can see too that the email library uses AUTH LOGIN. If you are sure that this prevents connection, I am able to suggest a workaround.

PHPMailer uses CRAM-MD5 https://github.com/PHPMailer/PHPMailer/b...p.php#L392
For keeping the original CodeIgniter Email API and not rewriting your code, you can install and try a library that I support: https://github.com/ivantcholakov/codeigniter-phpmailer , It simply replaces the mailer engine.
Reply
#3

Hi.

Thanks for the reply.
The first solution dont work.
Will check with the codeigniter-phpmailer library.

But i think workaround should be good.

Regards.
Reply
#4

Apply 1. and 2.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB