Welcome Guest, Not a member yet? Register   Sign In
Email Class TLS 587 SASL ERROR
#1

Codeigniter 3

Hello, seems I always have problems with CI and email.

I run a properly configured Postfix / Ubuntu email server. I have several apps that authenticate via TLS port 587, with a valid user / pass.

I can't seem to get CI to work however.

here is my latest email.php config:
Code:
$config = array(
'protocol' => 'smtp', // smtp, mail, sendmail
'smtp_timeout' => 30, //in seconds
'smtp_crypto' => 'tls',
'smtp_host' => 'mail2.myserver.com',
'mailpath' => '/usr/bin/sendmail',
'smtp_port' => 587,
'smtp_auth' => TRUE,
'smtp_user' => '[email protected]',
'smtp_pass' => 'thepass',
'mailtype' => 'text',
'charset' => 'utf-8',
'crlf' => "\r\n",
'smtp_keepalive' => TRUE,
'send_multipart' => FALSE,
'newline' => "\r\n",
'wordwrap' => TRUE
);

Then the result from $this->email->print_debugger();
Code:
hello: 250-mail2.mydomain.com
250-PIPELINING
250-SIZE 15240000
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING

starttls: 220 2.0.0 Ready to start TLS

hello: 250-mail2.mydomain.com
250-PIPELINING
250-SIZE 15240000
250-ETRN
250-AUTH PLAIN
250-AUTH=PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING

Failed to send AUTH LOGIN command. Error: 535 5.7.8 Error: authentication failed: Invalid authentication mechanism

Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

Date: Thu, 28 May 2020 00:27:29 +0000
From: "My Email" <[email protected]>
Return-Path: <[email protected]>
To: [email protected]
Subject: =?UTF-8?Q?My=20Domain=20Email=20Test?=
Reply-To: <[email protected]>
User-Agent: CodeIgniter
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0


Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Testing the My Domain Order Email


I've been tweaking config values for a few hours. Nothing seems to help. Any thoughts appreciated.
Reply
#2

hmm.. SMTP works if I just switch to:
'protocol' => 'mail',

??
Reply
#3

What happens if you use sendmail?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB