title: Problems to send mail in production - Codeigniter
body: <p>I've had problems to send emails in my production environment.</p>
  
  <p>This is my configurations settings:</p>
  
  <pre><code>define('EMAIL', serialize(array(
      'protocol' =&gt; 'smtp',
      'smtp_host' =&gt; 'ssl://mydomain.com',
      'smtp_port' =&gt; 465,
      'smtp_user' =&gt; 'myacount',
      'smtp_pass' =&gt; 'password',
      'mailtype'  =&gt; 'html',
      'charset'   =&gt; 'utf-8',
      'smtp_timeout' =&gt; 60,
      'newline' =&gt; "\r\n"
  </code></pre>
  
  <p>)));</p>
  
  <p>And that is the debug error:</p>
  
  <blockquote>
    <p>11/06/2018 09:36:03 falhou o emails 220-test.test.com ESMTP Exim 4.91</p>
    
    <h1>1 Mon, 11 Jun 2018 09:35:53 -0300 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.  hello:</h1>
    
    <p>250-test.test.com Hello test.adm.br [146.66.74.74] 250-SIZE 52428800
    250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250-SMTPUTF8 250 HELP
    Failed to authenticate password. Error: 535 Incorrect authentication
    data  Unable to send email using PHP SMTP. Your server might not be
    configured to send mail using this method. User-Agent: CodeIgniter
    Date: Mon, 11 Jun 2018 09:35:50 -0300 From: "CIT" &lt;<strong>myacount</strong>>
    Return-Path:  To: email1@gmail.com, email2@test.com.br
    Subject: =?UTF-8?Q?Chegou=20um=20termo=20de=20a?==?UTF-8?Q?ceite=20d?=
    =?UTF-8?Q?o=20cliente=20Teste=20envio?==?UTF-8?Q?=20de=20emai?= =?UTF-8?Q?l!?= Reply-To:  X-Sender: myacountr X-Mailer: CodeIgniter X-Priority: 3 (Normal) Message-ID:
    &lt;5b1e6ca6dbbb5@test.com.br> Mime-Version: 1.0</p>
    
    <p>Content-Type: multipart/alternative; boundary="B_ALT_5b1e6ca6dbc02"</p>
    
    <p>This is a multi-part message in MIME format. Your email application
    may not support this format.</p>
    
    <p>--B_ALT_5b1e6ca6dbc02 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit</p>
    
    <p>Email text!</p>
    
    <p>--B_ALT_5b1e6ca6dbc02 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable</p>
    
    <p>Email text!</p>
    
    <p>--B_ALT_5b1e6ca6dbc02--</p>
  </blockquote>
  
  <p>I saw many others similars issues, but no solution was found.</p>
  
  <p>P.s. When i test in my local environment it works fine. </p>