title: Gmail SMTP is not working in ec2 instance
body: <p>i am using Ubuntu based ec2 instance, recently i have shifted my code on aws and it seemed email functionality is not working. I am using gmail SMTP service
  below is my code</p>
  
  <pre><code>'Smtpmail'=&gt;array(
          'class'=&gt;'application.extensions.smtpmail.PHPMailer',
          'Host'=&gt;"smtp.gmail.com",
          'Username'=&gt;'username',
          'Password'=&gt;'password',
      'From'=&gt;'from addr', 
      'setForm'=&gt;'from name',
          'Mailer'=&gt;'smtp',
      'SMTPSecure'=&gt;'tls',
          'Port'=&gt;25,
          'SMTPAuth'=&gt;true, 
      ),
  
  this code is working on my unix based server but on aws it is giving below error
  </code></pre>
  
  <p>Mailer Error: The following From address failed: test@email.com : MAIL not accepted from server,530,5.5.1 Authentication Required. Learn more at 530 5.5.1 <a href="http://support.google.com/mail/bin/answer.py?answer=14257" rel="noreferrer">http://support.google.com/mail/bin/answer.py?answer=14257</a> y6sm27370508qen.21 - gsmtp </p>
  
  <p>Please help</p>