Get errors with javamail
<p>i'm trying an example of javamail and i get the following error:</p>

<pre><code> Exception in thread "main" javax.mail.AuthenticationFailedException: [AUTH] Application-specific password required: http://www.google.com/support/accounts/bin/answer.py?answer=185833
            at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:208)
            at javax.mail.Service.connect(Service.java:317)
            at javax.mail.Service.connect(Service.java:176)
            at javax.mail.Service.connect(Service.java:125)
            at javax.mail.Session.getFolder(Session.java:612)
            at MainClass.main(MainClass.java:19)
    Java Result: 1
</code></pre>

<p>The code used is from Java2s.com Get Attachment File Name.
And i use mail.jar from 1.4.4 version.</p>

<p>I don't understand the end of the code
here:</p>

<pre><code>class MailAuthenticator extends Authenticator {

  public MailAuthenticator() {
  }

  public PasswordAuthentication getPasswordAuthentication() {
    return new PasswordAuthentication("username", "password");
  }
}
</code></pre>

<p>Thank you</p>
