title: Access Gmail Inbox using libcurl in C++
body: <p>I am writing a program which can access gmail account of a user and then show unread emails.
  I am not sure what url should I use for</p>
  
  <pre><code>curl_easy_setopt(curl, CURLOPT_URL,"urlhere")
  </code></pre>
  
  <p>I am asking this after reading this question </p>
  
  <p><a href="https://stackoverflow.com/questions/7809693/smtp-mail-using-libcurl">SMTP mail using libcurl</a></p>
  
  <p>I have already tried writing "mail.google.com" , it didn't work.</p>
  
  <p>According to link here </p>
  
  <p><a href="http://email.about.com/od/accessinggmail/f/Gmail_POP3_Settings.htm" rel="nofollow noreferrer">http://email.about.com/od/accessinggmail/f/Gmail_POP3_Settings.htm</a></p>
  
  <p><code>Gmail POP server address: pop.gmail.com</code>
  <code>Gmail POP port: 995</code></p>
  
  <p>So I tried </p>
  
  <pre><code> "pop3://pop.gmail.com:995"
  </code></pre>
  
  <p>but it returns CURLE_RECV_ERROR which says that 
  "Failure when recieving Data from the peer".</p>