title: PHP+Ubuntu Send email using gmail form localhost
body: <p>I have searched several posts on this but no luck. Everyone is using postfix. But when I gone through the text on 
  <a href="https://help.ubuntu.com/community/Postfix" rel="nofollow noreferrer">https://help.ubuntu.com/community/Postfix</a></p>
  
  <blockquote>
    <p>What is a Mail Transfer Agent
    In other words, it's a mail server not a
    mail client like Thunderbird, Evolution, Outlook, Eudora, or a
    web-based email service like Yahoo, GMail, Hotmail, Earthlink,
    Comcast, SBCGlobal.net, ATT.net etc.... If you worked for a company
    named Acme and owned acme.com, you could provide your employees with
    email addresses @acme.com. Employees could send and receive email
    through your computer, but not without your computer running all the
    time. <strong>If all your email addresses are at a domain (@gmail.com,
    @yahoo.com) you do not own (you don't own Google) or do not host
    (acme.com) then you do not need this at all.</strong></p>
  </blockquote>
  
  <p>As the last line says You cannot us it for gmail or yahoo to make it work from localhost..!</p>
  
  <p>Can anyone tell me how can I configure mail server on localhost using gmail SMTP? I am using Ubuntu 14. </p>
  
  <p>Links I have tried before NONE of them worked for me. No error or warnings during testing of below listed links</p>
  
  <p><a href="https://askubuntu.com/questions/314664/sending-php-mail-from-localhost">https://askubuntu.com/questions/314664/sending-php-mail-from-localhost</a>
  <a href="https://askubuntu.com/questions/228938/how-can-i-configure-postfix-to-send-all-email-through-my-gmail-account">https://askubuntu.com/questions/228938/how-can-i-configure-postfix-to-send-all-email-through-my-gmail-account</a>
  <a href="https://easyengine.io/tutorials/linux/ubuntu-postfix-gmail-smtp/" rel="nofollow noreferrer">https://easyengine.io/tutorials/linux/ubuntu-postfix-gmail-smtp/</a>
  <a href="https://easyengine.io/tutorials/mail/postfix-debugging/" rel="nofollow noreferrer">https://easyengine.io/tutorials/mail/postfix-debugging/</a></p>