title: Unable to send mail with AWS SES
body: <p>I have setup my web app on ec2 ubuntu 18.04 with apache server, to send email notification, I've configured <strong>AWS SES</strong> and obtained <strong>SMTP credentials</strong> as per following link -
  <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html</a></p>
  <p>following is my php codes to send email -</p>
  <pre><code>$mail_config['smtp_host'] = 'email-smtp.us-west-2.amazonaws.com';
  $mail_config['smtp_port'] = '465';
  $mail_config['smtp_user'] = 'xxxx';
  //$mail_config['_smtp_auth'] = TRUE;
  $mail_config['smtp_pass'] = 'xxxx';
  $mail_config['smtp_crypto'] = 'ssl';
  $mail_config['protocol'] = 'smtp';
  $mail_config['mailtype'] = 'html';
  $mail_config['send_multipart'] = FALSE;
  $mail_config['charset'] = 'utf-8';
  $mail_config['wordwrap'] = TRUE;  
  $this-&gt;email-&gt;initialize($mail_config);
  
  $this-&gt;email-&gt;from('info@mydomain.co', 'info');
  $this-&gt;email-&gt;to('my_gmail_address_here'); 
  $this-&gt;email-&gt;subject('Email Test');
  $this-&gt;email-&gt;message('Testing the email class.');  
  
  if($this-&gt;email-&gt;send()){
      echo &quot;Sent&quot;;
  } else {
      echo $this-&gt;email-&gt;print_debugger();
  }
  </code></pre>
  <p>but it throws -</p>
  <p><strong>The following SMTP error was encountered:
  Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.</strong></p>
  <p>I have opened SMTP and SMTPS ports as well. Is there anything else I need to check??</p>
  <p><strong>Update -</strong> I tried it on another server but it says
  <strong>Failed to authenticate password. Error: 535 Authentication Credentials Invalid
  Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.</strong></p>
  <p><strong>Update 1</strong> - my overall architecture is as follows -</p>
  <ol>
  <li>Purchased domain from Google</li>
  <li>Deployed web app on EC2 (Ubuntu 18.04 with apache server)</li>
  <li>Created hosted zone in Route53</li>
  <li>Updated google domain DNS (NS record ) with custom NS from Route53</li>
  <li>Attached EC2 with Application Load Balancer</li>
  </ol>
  <p>SSL obtained from AWS Certificate Manager</p>
  <p>Thank you!</p>